@vinaverse/server 0.1.0-alpha.15 → 0.1.0-alpha.17
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/README.md +8 -0
- package/dist/api.cjs +44 -0
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +31 -2
- package/dist/api.d.ts +31 -2
- package/dist/api.js +44 -0
- package/dist/api.js.map +1 -1
- package/dist/express.d.cts +2 -2
- package/dist/express.d.ts +2 -2
- package/dist/fastify.d.cts +2 -2
- package/dist/fastify.d.ts +2 -2
- package/dist/hono.d.cts +2 -2
- package/dist/hono.d.ts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lambda.d.cts +2 -2
- package/dist/lambda.d.ts +2 -2
- package/dist/{provider-ClyzwMQx.d.ts → provider-1SsRbyN-.d.ts} +6 -1
- package/dist/{provider-CLoSmI29.d.cts → provider-DhsUFcqq.d.cts} +6 -1
- package/dist/{vinaverse-v1.d-DiulmRgx.d.cts → vinaverse-v1.d-D-NPpZqW.d.cts} +1339 -25
- package/dist/{vinaverse-v1.d-DiulmRgx.d.ts → vinaverse-v1.d-D-NPpZqW.d.ts} +1339 -25
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ interface paths {
|
|
|
18
18
|
* @description A session belongs to a conversation when it names one (`conversation_key`, `conversation_id`, or both) or when its agent runs a guided flow; a flow session that names none starts a new conversation. `Session` then returns its `conversation_id`, and a conversation started without a key can later be resumed by that id. A conversation is scoped to the tenant, the environment, the `subject.id` and the `agent`, and (v1-draft.20) the mode and business scope it started with; `subject.type` itself is not part of it, so a guest who signs in keeps the conversation.
|
|
19
19
|
* **`business_setup`.** The `business_setup` capability is only for a business's own people: a `subject.type` of `professional`, `host` or `staff`. Asked for any other subject, it is `400 invalid_request` with the pointer `/tool_access/capabilities`.
|
|
20
20
|
* **`booking_proposals`.** The `booking_proposals` capability is only for a `client`: not a guest, who has no account in the tenant's app to confirm with. Asked for any other subject, it is `400 invalid_request` with the pointer `/tool_access/capabilities`.
|
|
21
|
+
* **`business_bookings` and `payouts`.** Like `business_setup`, only for a business's own people: a `subject.type` of `professional`, `host` or `staff`. Asked for any other subject, it is `400 invalid_request` with the pointer `/tool_access/capabilities` (v1-draft.38).
|
|
22
|
+
* **`quotes`** (v1-draft.31). The `quotes` capability is never for a `guest`: a cart is priced for a signed-in person. Asked for a guest, it is `400 invalid_request` with the pointer `/tool_access/capabilities`.
|
|
21
23
|
* **Audience** (v1-draft.20). An agent talks only to the subject types of its template (admin-v1 `AgentProfile.audience`): the customer agent to a `client` or `guest`, a business agent to a `professional`, `host` or `staff`, a guided flow to anyone its tenant names. Any other `subject.type` is `400 invalid_request` with the pointer `/subject/type`. The tenant's backend sets the type by the side of its app the person is on, never by the account's roles: a professional booking for themselves is a `client`.
|
|
22
24
|
* **Mode and business scope** (v1-draft.20). `experience_mode` is the agent's side: `customer` for the customer agent, `business` for a business agent. Left out, it follows the agent's template; given, it must match it (`400 invalid_request`, `/experience_mode`). `business_scope_id` names the business the person acts for (a professional's business, a host's place): only with `business` (`400`, `/business_scope_id`), and the tenant's backend derives it from its own records, never from the app. A conversation is bound, when it starts, to the subject, the agent, the mode and the business scope. The mode stands for the side of the app, so a guest who signs in as a client keeps their conversation, while a professional never resumes a customer conversation (the audience rule keeps each side's types apart). Resuming with any of them different is `404 not_found` (step 1 below), never a switch: a person acting for business A never resumes business B's conversation.
|
|
23
25
|
* **The checks, in this order:** 1. `conversation_id` is given, and is unknown, erased, or belongs to another tenant, environment, `agent` or
|
|
@@ -494,7 +496,8 @@ interface paths {
|
|
|
494
496
|
get?: never;
|
|
495
497
|
put?: never;
|
|
496
498
|
/**
|
|
497
|
-
* @description Erases the subject's data: transcripts, screening texts, memory, indexes, the conversation state of its guided flows (recorded answers, remarks, transcript), and the explore suggestion decisions made for it, and revokes its open sessions. `subject.erased` follows.
|
|
499
|
+
* @description Erases the subject's data: transcripts, screening texts, memory (v1-draft.27: the preferences and the last search; a choice not to be remembered is kept, as a keyed hash of the subject id only), indexes, the conversation state of its guided flows (recorded answers, remarks, transcript), and the explore suggestion decisions made for it, and revokes its open sessions. `subject.erased` follows.
|
|
500
|
+
* Backups are not edited (v1-draft.39): the erasure is re-applied after every restore of Vinaverse's database, so a backup never brings it back, and backups expire within 35 days.
|
|
498
501
|
* **A subject Vinaverse holds nothing for** (never seen, or already erased) is `404` with `code: not_found` and `type: https://docs.vinaverse.com/problems/subject-not-found`; a client matches on the `type` ending in `/problems/subject-not-found`. Only that answer means nothing is held, and nothing needs erasing. Vinaverse keeps no record of erased subjects to tell the two apart. Any other `404` (a wrong base URL, say) is not that answer, and the caller retries.
|
|
499
502
|
*/
|
|
500
503
|
post: operations["eraseSubject"];
|
|
@@ -504,6 +507,79 @@ interface paths {
|
|
|
504
507
|
patch?: never;
|
|
505
508
|
trace?: never;
|
|
506
509
|
};
|
|
510
|
+
"/v1/subjects/{subject_id}/memory": {
|
|
511
|
+
parameters: {
|
|
512
|
+
query?: never;
|
|
513
|
+
header?: never;
|
|
514
|
+
path?: never;
|
|
515
|
+
cookie?: never;
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* What the agent remembers about a person, and whether it may
|
|
519
|
+
* @description v1-draft.27 (VIN-223): what Vinaverse keeps to remember a person across conversations, so the tenant's app can show it to them. A service key with `memory:read`, for its own tenant and environment; the app asks the tenant's backend, never with a client secret.
|
|
520
|
+
* **What is kept, and nothing else.** - `remembered`: whether the person lets the agent remember them (on by default; `putSubjectMemory` turns it
|
|
521
|
+
* off for both sides of the app).
|
|
522
|
+
* - `notice_acknowledged`: the version of the memory notice the person acknowledged, if any. - `preferences`: what the person asked the agent to remember, in the words the agent said back to the
|
|
523
|
+
* person, each with the conversation it came from. Never inferred from what they viewed or booked. Never a
|
|
524
|
+
* health fact or a never-store detail (v1-draft.39); a fact about someone else is the person's own note.
|
|
525
|
+
* - `last_search`: the last open search intent (a service and a place, as the search resolved them, never the
|
|
526
|
+
* person's words), for at most 7 days, which the agent may offer as a question.
|
|
527
|
+
*
|
|
528
|
+
* Preferences and the last search belong to one side of the app: `experience_mode` (left out, `customer`) and, for a business, `business_scope_id`. A subject Vinaverse holds nothing for reads as remembered, with nothing kept. Erasing the subject (`eraseSubject`) removes preferences and the last search; a choice not to be remembered outlives it, kept as a keyed hash of the subject id only.
|
|
529
|
+
*/
|
|
530
|
+
get: operations["getSubjectMemory"];
|
|
531
|
+
/**
|
|
532
|
+
* Let the agent remember a person, or not
|
|
533
|
+
* @description v1-draft.27 (VIN-223): the person's choice, through the tenant's backend (a service key with `memory:write`). `remembered: false` is "don't remember me": on both sides of the app at once, it deletes the preferences and the last search, and from then on no session reads or writes memory for the person and no earlier conversation is mentioned to the agent. It outlives an erasure. `remembered: true` turns memory back on, with nothing restored. Idempotent: the same choice again changes nothing.
|
|
534
|
+
*/
|
|
535
|
+
put: operations["putSubjectMemory"];
|
|
536
|
+
post?: never;
|
|
537
|
+
delete?: never;
|
|
538
|
+
options?: never;
|
|
539
|
+
head?: never;
|
|
540
|
+
patch?: never;
|
|
541
|
+
trace?: never;
|
|
542
|
+
};
|
|
543
|
+
"/v1/subjects/{subject_id}/memory/notice": {
|
|
544
|
+
parameters: {
|
|
545
|
+
query?: never;
|
|
546
|
+
header?: never;
|
|
547
|
+
path?: never;
|
|
548
|
+
cookie?: never;
|
|
549
|
+
};
|
|
550
|
+
get?: never;
|
|
551
|
+
put?: never;
|
|
552
|
+
/**
|
|
553
|
+
* The person saw the memory notice
|
|
554
|
+
* @description v1-draft.27 (VIN-223): the app showed `Session.memory.notice` and the person dismissed it; the tenant's backend records that (a service key with `memory:write`), so no later session carries that version. A newer version is shown again. `version` must be the current notice's (`400` at `/version` otherwise). Idempotent.
|
|
555
|
+
*/
|
|
556
|
+
post: operations["acknowledgeMemoryNotice"];
|
|
557
|
+
delete?: never;
|
|
558
|
+
options?: never;
|
|
559
|
+
head?: never;
|
|
560
|
+
patch?: never;
|
|
561
|
+
trace?: never;
|
|
562
|
+
};
|
|
563
|
+
"/v1/subjects/{subject_id}/memory/preferences/{preference_id}": {
|
|
564
|
+
parameters: {
|
|
565
|
+
query?: never;
|
|
566
|
+
header?: never;
|
|
567
|
+
path?: never;
|
|
568
|
+
cookie?: never;
|
|
569
|
+
};
|
|
570
|
+
get?: never;
|
|
571
|
+
put?: never;
|
|
572
|
+
post?: never;
|
|
573
|
+
/**
|
|
574
|
+
* Forget one thing the person asked the agent to remember
|
|
575
|
+
* @description v1-draft.27 (VIN-223): a service key with `memory:write`. The preference is deleted everywhere; the agent no longer reads it from the next turn. Another subject's, an unknown or an already deleted preference is the same `404 not_found`.
|
|
576
|
+
*/
|
|
577
|
+
delete: operations["deleteMemoryPreference"];
|
|
578
|
+
options?: never;
|
|
579
|
+
head?: never;
|
|
580
|
+
patch?: never;
|
|
581
|
+
trace?: never;
|
|
582
|
+
};
|
|
507
583
|
"/v1/events": {
|
|
508
584
|
parameters: {
|
|
509
585
|
query?: never;
|
|
@@ -553,6 +629,46 @@ interface paths {
|
|
|
553
629
|
patch?: never;
|
|
554
630
|
trace?: never;
|
|
555
631
|
};
|
|
632
|
+
"/v1/agents/{agent}/experience": {
|
|
633
|
+
parameters: {
|
|
634
|
+
query?: never;
|
|
635
|
+
header?: never;
|
|
636
|
+
path?: never;
|
|
637
|
+
cookie?: never;
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* The chat experience the tenant set for an agent, before any session
|
|
641
|
+
* @description v1-draft.40 (VIN-115, the chat spec's module G TC-02): what the app needs before a session opens (the launcher, the switcher, history, an Ask row), for the tenant's backend to copy into its agent status (agent-backend `status.features.chat`). A service key with `sessions:write`, for its own tenant and environment. The value is resolved as `Session.experience` is, except for a client's capabilities. Cacheable for 60 seconds: a change in Studio reaches new sessions at once and this read within a minute. An unknown or inactive agent is `404 not_found`.
|
|
642
|
+
*/
|
|
643
|
+
get: operations["getAgentExperience"];
|
|
644
|
+
put?: never;
|
|
645
|
+
post?: never;
|
|
646
|
+
delete?: never;
|
|
647
|
+
options?: never;
|
|
648
|
+
head?: never;
|
|
649
|
+
patch?: never;
|
|
650
|
+
trace?: never;
|
|
651
|
+
};
|
|
652
|
+
"/v1/meta": {
|
|
653
|
+
parameters: {
|
|
654
|
+
query?: never;
|
|
655
|
+
header?: never;
|
|
656
|
+
path?: never;
|
|
657
|
+
cookie?: never;
|
|
658
|
+
};
|
|
659
|
+
/**
|
|
660
|
+
* The contract version this gateway runs
|
|
661
|
+
* @description v1-draft.25 (VIN-115): what is deployed behind this base URL. No credential and no tenant: the same answer for everyone, cacheable for 60 seconds. `api_version` is this document's `info.version` as the gateway serves it (the `Vinaverse-Api-Version` response header carries the same); `contracts.commit` is the vinaverse-contracts commit the build pinned. A field the build did not record is absent, never guessed. The gateway's own commit is not served: it would fingerprint the exact deployment for a scanner, and an SDK needs only these two.
|
|
662
|
+
*/
|
|
663
|
+
get: operations["getMeta"];
|
|
664
|
+
put?: never;
|
|
665
|
+
post?: never;
|
|
666
|
+
delete?: never;
|
|
667
|
+
options?: never;
|
|
668
|
+
head?: never;
|
|
669
|
+
patch?: never;
|
|
670
|
+
trace?: never;
|
|
671
|
+
};
|
|
556
672
|
"/v1/usage": {
|
|
557
673
|
parameters: {
|
|
558
674
|
query?: never;
|
|
@@ -1289,6 +1405,8 @@ interface webhooks {
|
|
|
1289
1405
|
}
|
|
1290
1406
|
interface components {
|
|
1291
1407
|
schemas: {
|
|
1408
|
+
/** @description A model as Vinaverse names it (v1-draft.34): a release `<family>@<date>.<n>` (immutable) or a family alias `<family>` or `<family>:<channel>` of a family tenants read (`vina-agent`, the language model; `vina-embed`, the embeddings), or, when no model made a decision, the producer's own id (`vv-detectors`, `mock`). Never a base model, a size, a host or a model server's id. Its display name is the object's `label` (v1-draft.35). */
|
|
1409
|
+
ModelName: string;
|
|
1292
1410
|
Problem: {
|
|
1293
1411
|
/** Format: uri */
|
|
1294
1412
|
type: string;
|
|
@@ -1332,6 +1450,7 @@ interface components {
|
|
|
1332
1450
|
locale?: string;
|
|
1333
1451
|
/** @example America/New_York */
|
|
1334
1452
|
timezone?: string;
|
|
1453
|
+
/** @description the person's coarse area (a profile area or a device's city), never a street; like `ScreenContext.filters.near`, the gateway rounds `lat` and `lng` to 2 decimals on receipt, before either is stored, logged or forwarded to a tool */
|
|
1335
1454
|
approximate_location?: {
|
|
1336
1455
|
lat: number;
|
|
1337
1456
|
lng: number;
|
|
@@ -1342,10 +1461,10 @@ interface components {
|
|
|
1342
1461
|
/** @enum {string} */
|
|
1343
1462
|
Feature: "assistant" | "moderation_image" | "moderation_video" | "moderation_text" | "screening" | "document_check" | "insights" | "suggestions";
|
|
1344
1463
|
/**
|
|
1345
|
-
* @description `business_setup`: grants the business's own read tools and its `propose` tools (`tool-provider-v1.yaml`, `x-effect: propose`), for the `business_setup` agent; never a write tool. Only a subject of type `professional`, `host` or `staff` may be granted it. `booking_proposals`: grants the tenant's `propose` tools for a client's bookings (a booking, a reschedule, a cancellation the client confirms in the tenant's app), for the customer agent; never a write tool. Only a subject of type `client` may be granted it (`docs/agents-guardrails-suggestions-writes.md` §3.4). These two are the only capabilities that carry `propose` tools: `create_proposal` and every tenant `propose` tool require one of them. `flows`: grants the guided-flow endpoints (`tool-provider-v1.yaml`, `/flows/*`). It names no flow and no record: the tenant limits the `tool_access` token itself to one flow and one record. `my_orders`: grants reading the customer's own kits and orders from a styling-kit retailer (`tool-provider-v1.yaml`, `list_my_kits`, `get_my_kit`, `list_my_orders`, `get_my_order`), read only. Like `my_bookings`, it is meant for a signed-in `client`, and the tenant answers for the token's customer only.
|
|
1464
|
+
* @description `quotes`: grants pricing a cart before booking it (`tool-provider-v1.yaml` `get_quote`), read only; never granted to a `guest` (v1-draft.31). `business_setup`: grants the business's own read tools and its `propose` tools (`tool-provider-v1.yaml`, `x-effect: propose`), for the `business_setup` agent; never a write tool. Only a subject of type `professional`, `host` or `staff` may be granted it. `booking_proposals`: grants the tenant's `propose` tools for a client's bookings (a booking, a reschedule, a cancellation the client confirms in the tenant's app), for the customer agent; never a write tool. Only a subject of type `client` may be granted it (`docs/agents-guardrails-suggestions-writes.md` §3.4). These two are the only capabilities that carry `propose` tools: `create_proposal` and every tenant `propose` tool require one of them. `flows`: grants the guided-flow endpoints (`tool-provider-v1.yaml`, `/flows/*`). It names no flow and no record: the tenant limits the `tool_access` token itself to one flow and one record. `my_orders`: grants reading the customer's own kits and orders from a styling-kit retailer (`tool-provider-v1.yaml`, `list_my_kits`, `get_my_kit`, `list_my_orders`, `get_my_order`), read only. Like `my_bookings`, it is meant for a signed-in `client`, and the tenant answers for the token's customer only. `business_bookings`: grants reading the business's own bookings, those waiting for its answer and those coming up, read only. `payouts`: grants reading the state of the business's own payout account (not set up, under review, active), read only, never an amount or a bank detail. Only a subject of type `professional`, `host` or `staff` may be granted either (v1-draft.38).
|
|
1346
1465
|
* @enum {string}
|
|
1347
1466
|
*/
|
|
1348
|
-
Capability: "search" | "availability" | "quotes" | "my_bookings" | "policies" | "handoff" | "flows" | "business_setup" | "booking_proposals" | "my_orders";
|
|
1467
|
+
Capability: "search" | "availability" | "quotes" | "my_bookings" | "policies" | "handoff" | "flows" | "business_setup" | "booking_proposals" | "my_orders" | "business_bookings" | "payouts";
|
|
1349
1468
|
ToolAccess: {
|
|
1350
1469
|
token: string;
|
|
1351
1470
|
/** Format: date-time */
|
|
@@ -1466,6 +1585,9 @@ interface components {
|
|
|
1466
1585
|
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
1467
1586
|
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
1468
1587
|
screen_context?: components["schemas"]["ScreenContext"];
|
|
1588
|
+
anchor?: components["schemas"]["SessionAnchor"];
|
|
1589
|
+
client?: components["schemas"]["SessionClient"];
|
|
1590
|
+
entry?: components["schemas"]["SessionEntry"];
|
|
1469
1591
|
};
|
|
1470
1592
|
/**
|
|
1471
1593
|
* @description v1-draft.20, optional on `createSession`: the side of the tenant's app the person is on. `customer` for the customer agent (a `client` or `guest`), `business` for a business agent (a `professional`, `host` or `staff`). Left out, it follows the agent's template; `createSession` describes the binding.
|
|
@@ -1497,6 +1619,15 @@ interface components {
|
|
|
1497
1619
|
/** Format: date */
|
|
1498
1620
|
date_to?: string;
|
|
1499
1621
|
price_max?: components["schemas"]["Money"];
|
|
1622
|
+
/** @description v1-draft.32, the place the person is searching now, as the app shows it ("Billings, MT"); for "near me" it comes after a place named in the message and before `subject.approximate_location`. `lat` and `lng` are rounded to 2 decimals (about a kilometre) or coarser; the gateway never asks for finer, and rounds anything finer it receives (a raw GPS fix, say) to 2 decimals on receipt, before it is stored, logged or forwarded to a tool. */
|
|
1623
|
+
near?: {
|
|
1624
|
+
lat: number;
|
|
1625
|
+
lng: number;
|
|
1626
|
+
/** @description in Unicode code points; quoted to the agent as data */
|
|
1627
|
+
label: string;
|
|
1628
|
+
/** @enum {string} */
|
|
1629
|
+
precision?: "city" | "neighborhood";
|
|
1630
|
+
};
|
|
1500
1631
|
};
|
|
1501
1632
|
/** @description the tenant's counter for this person's screen state; a later update never goes back to a lower one (v1-draft.23: `updateSessionContext` refuses one that is not greater) */
|
|
1502
1633
|
revision: number;
|
|
@@ -1512,6 +1643,366 @@ interface components {
|
|
|
1512
1643
|
revision: number;
|
|
1513
1644
|
screen_context?: components["schemas"]["ScreenContext"];
|
|
1514
1645
|
};
|
|
1646
|
+
/**
|
|
1647
|
+
* @description v1-draft.37, what a context-started chat is about (`docs/context-started-chats.md`). `booking`: a service booking, the customer's own. `rental`: a space rental, the renter's own. `professional`, `workspace`, `service` and `class`: a published profile, space, service or class. `policy`: a policy or legal page. A closed list: a new type is a contract change.
|
|
1648
|
+
* @enum {string}
|
|
1649
|
+
*/
|
|
1650
|
+
AnchorType: "booking" | "rental" | "professional" | "workspace" | "service" | "class" | "policy";
|
|
1651
|
+
/**
|
|
1652
|
+
* @description v1-draft.37, optional on `createSession`: the object a context-started chat is about, as the tenant's backend read it for this person, server to server, with the same authorization and rules as its screen, then reduced by its disclosure policy for agents. Never from client text. Absent: an unanchored session, as before.
|
|
1653
|
+
* **Evidence and quoted data, never instructions.** The gateway keeps `facts` as evidence entries keyed by the object, the field and `as_of`, so a reply's amounts, money verbs and deadlines are checked against them by meaning. The agent reads the typed facts in the turn's details as quoted data under a protected lead, never as instructions and never in the cached prompt. Free text a professional wrote (a service's `description`, a class's `rules` and `cancellation_terms`) is third-party text: it is instruction-checked before the agent reads it, like a tool result's third-party text, and never decides anything. Its identity (`type`, `id`) never changes for the conversation; its facts are refreshed with the connector's anchor read (admin-v1 `Connector.anchors`).
|
|
1654
|
+
* **Limits.** At most 4096 bytes as serialized UTF-8 JSON; text fields at most 80 code points, except a `service` or `class` description, rules and cancellation terms, at most 500. An anchor over a limit or malformed is `400 invalid_request` with a pointer under `/anchor`, and the session is not opened. To fit, the tenant trims and marks the anchor `partial`, in this order: lists are cut from their end (a professional's services keep the ones the person can book first; a space's taken days keep the soonest first; a class's sessions the soonest first), then optional fields are left out. It never sends an anchor over the limit.
|
|
1655
|
+
* **completeness.** `complete`: every field the type's projection allows is present. `partial`: some could not be read; absent fields mean "not known", never zero or "nothing". `unavailable`: the read failed; only `type`, `id`, `title` and `completeness` are present, and the agent names the object from `title`, says its details could not load, and still answers.
|
|
1656
|
+
* **display** is what the person sees on the anchor card, formatted by the tenant in the person's language as its own screen shows it: an optional `subtitle`, at most four `{label, value}` facts and an optional `deep_link` to the object's screen. It is for the person only and never reaches the model (the model reasons from the typed `facts`). The deep link must pass the deep-link rule (admin-v1 `Connector.deep_link_prefixes`), or it is dropped and the card keeps the rest.
|
|
1657
|
+
* A `policy` anchor carries its `id` (the page's slug) and `title` only: the text is read through the connector's `get_policy`, never carried in the anchor.
|
|
1658
|
+
*/
|
|
1659
|
+
SessionAnchor: {
|
|
1660
|
+
type: components["schemas"]["AnchorType"];
|
|
1661
|
+
/** @description the tenant's object id, the same one its tools accept (a policy's slug for `policy`) */
|
|
1662
|
+
id: string;
|
|
1663
|
+
/** @description the anchor schema version for this `type`, the tenant's */
|
|
1664
|
+
version?: number;
|
|
1665
|
+
/**
|
|
1666
|
+
* Format: date-time
|
|
1667
|
+
* @description when the tenant read the object; the source revision of every fact
|
|
1668
|
+
*/
|
|
1669
|
+
as_of?: string;
|
|
1670
|
+
/** @description the tenant's code for the object's state, from its closed list per `type`. Open in this draft: an unknown value is accepted and gets the generic anchored greeting. The lists are added here, additively, once the tenant's screen-parity check per value is done. */
|
|
1671
|
+
situation?: string;
|
|
1672
|
+
/** @enum {string} */
|
|
1673
|
+
completeness: "complete" | "partial" | "unavailable";
|
|
1674
|
+
/** @description in Unicode code points: "ABZ Fitness Center, Oct 16 to 24"; also the history group title */
|
|
1675
|
+
title: string;
|
|
1676
|
+
/** @description the object's facts, typed per `type` (`BookingFacts`, `RentalFacts`, `ProfessionalFacts`, `WorkspaceFacts`, `ServiceFacts`, `ClassFacts`); none for a `policy`. Only what the tenant's projection for agents allows: a field's presence is a promise, anything not listed is not sent. Absent means "can't be worked out", never zero. */
|
|
1677
|
+
facts?: Record<string, unknown>;
|
|
1678
|
+
/** @description what the person may do or ask about now, each eligible or not; the app draws chips only for ids it knows */
|
|
1679
|
+
intents?: components["schemas"]["AnchorIntent"][];
|
|
1680
|
+
deadlines?: components["schemas"]["AnchorDeadline"][];
|
|
1681
|
+
display?: components["schemas"]["AnchorDisplay"];
|
|
1682
|
+
} & (unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown);
|
|
1683
|
+
/** @description v1-draft.37, the anchor card's display, formatted by the tenant in the person's language, for the person only: it never reaches the model. `deep_link` must pass the deep-link rule, or it is dropped. */
|
|
1684
|
+
AnchorDisplay: {
|
|
1685
|
+
/** @description in Unicode code points */
|
|
1686
|
+
subtitle?: string;
|
|
1687
|
+
facts?: {
|
|
1688
|
+
/** @description in Unicode code points */
|
|
1689
|
+
label: string;
|
|
1690
|
+
/** @description in Unicode code points */
|
|
1691
|
+
value: string;
|
|
1692
|
+
}[];
|
|
1693
|
+
deep_link?: string;
|
|
1694
|
+
};
|
|
1695
|
+
/** @description v1-draft.37, one thing the person may do (`action`: a hand-off to the tenant's own screen, `open_action`) or ask (`explain`: answered from the manifest's template, filled from the anchor's facts). Eligibility comes only from here. An ineligible intent carries `reason`, a code; the words a person reads come from the templates. */
|
|
1696
|
+
AnchorIntent: {
|
|
1697
|
+
id: components["schemas"]["IntentId"];
|
|
1698
|
+
/** @enum {string} */
|
|
1699
|
+
kind: "action" | "explain";
|
|
1700
|
+
eligible: boolean;
|
|
1701
|
+
/** @description why it is not eligible now, a code (`outside_window`, `not_for_customers`) */
|
|
1702
|
+
reason?: string;
|
|
1703
|
+
/** @description an `action` intent's route, one the connector manifest declares (admin-v1 `Connector.actions.routes`) */
|
|
1704
|
+
route?: string;
|
|
1705
|
+
};
|
|
1706
|
+
/** @description v1-draft.37, a stable intent id (`cancel_rental`, `explain_hold`), the same across languages and builds */
|
|
1707
|
+
IntentId: string;
|
|
1708
|
+
/** @description v1-draft.37, a moment the person must act by, with the zone it is stated in. The sentence gate holds a reply to these: a deadline is said with its zone, in the person's zone too when it differs, and a passed one is never stated as future. */
|
|
1709
|
+
AnchorDeadline: {
|
|
1710
|
+
/**
|
|
1711
|
+
* @description closed, since the gate's money and deadline rules key on it; this set is proposed (the joint spec names none) and may grow additively. `approval`: the host or professional must answer by then. `payment_due`: an amount is due. `cancel_refund_until`: cancelling before then gets the stated refund. `reschedule_until`: the booking may be moved until then. `deposit_dispute_until`: a deposit claim may be disputed until then. `deposit_return_by`: the deposit is returned by then.
|
|
1712
|
+
* @enum {string}
|
|
1713
|
+
*/
|
|
1714
|
+
kind: "approval" | "payment_due" | "cancel_refund_until" | "reschedule_until" | "deposit_dispute_until" | "deposit_return_by";
|
|
1715
|
+
/** Format: date-time */
|
|
1716
|
+
at: string;
|
|
1717
|
+
/** @description `payment_due` only: what is due by `at` (a booking awaiting the person's payment, a rent due) */
|
|
1718
|
+
amount?: components["schemas"]["Money"];
|
|
1719
|
+
/** @description an IANA time zone: `America/New_York` */
|
|
1720
|
+
zone: string;
|
|
1721
|
+
};
|
|
1722
|
+
/**
|
|
1723
|
+
* @description v1-draft.37, where the money of a booking or rental is, mapped by the tenant from its own states at its boundary, with a test per value. The money verbs an agent may say follow it: "held, not charged" while `held`; "charged" only when `charged`; "released" only at `release_confirmed`; `due` and `paid_in_person` never said as a card charge.
|
|
1724
|
+
* @enum {string}
|
|
1725
|
+
*/
|
|
1726
|
+
PaymentState: "none" | "due" | "held" | "charged" | "paid_in_person" | "release_requested" | "release_confirmed" | "release_failed" | "refund_pending" | "refund_settled" | "partially_refunded" | "refund_failed" | "manual_review";
|
|
1727
|
+
/** @description v1-draft.37, where, as an area only; never the street */
|
|
1728
|
+
AnchorPlace: {
|
|
1729
|
+
area: string;
|
|
1730
|
+
};
|
|
1731
|
+
AnchorParty: {
|
|
1732
|
+
id?: string;
|
|
1733
|
+
display_name: string;
|
|
1734
|
+
};
|
|
1735
|
+
/** @description v1-draft.37, a service's price per place it is offered at */
|
|
1736
|
+
AnchorPrices: {
|
|
1737
|
+
at_professional?: components["schemas"]["Money"];
|
|
1738
|
+
at_customer?: components["schemas"]["Money"];
|
|
1739
|
+
other?: components["schemas"]["Money"];
|
|
1740
|
+
};
|
|
1741
|
+
/** @description v1-draft.37, a `rental` anchor's facts (joint spec §2.1, with the tenant's review). `amount_held` only while `payment_state` is `held`, `amount_charged` only when it is `charged`; `cancel_now` absent when it cannot be worked out. An amount due is the `payment_due` deadline's `amount`. The renter's licence and insurance are standing codes only (never a scan), and documents and maintenance are counts per state (never contents). */
|
|
1742
|
+
RentalFacts: {
|
|
1743
|
+
/** @description the lease, kept distinct from the rental id */
|
|
1744
|
+
lease_id?: string;
|
|
1745
|
+
space?: {
|
|
1746
|
+
id?: string;
|
|
1747
|
+
name: string;
|
|
1748
|
+
area?: string;
|
|
1749
|
+
};
|
|
1750
|
+
host?: components["schemas"]["AnchorParty"];
|
|
1751
|
+
/** @description the rental's dates; no `end` for an open-ended rental */
|
|
1752
|
+
dates?: {
|
|
1753
|
+
/** Format: date */
|
|
1754
|
+
start: string;
|
|
1755
|
+
/** Format: date */
|
|
1756
|
+
end?: string;
|
|
1757
|
+
zone: string;
|
|
1758
|
+
};
|
|
1759
|
+
total?: components["schemas"]["Money"];
|
|
1760
|
+
deposit?: components["schemas"]["Money"];
|
|
1761
|
+
payment_state?: components["schemas"]["PaymentState"];
|
|
1762
|
+
amount_held?: components["schemas"]["Money"];
|
|
1763
|
+
amount_charged?: components["schemas"]["Money"];
|
|
1764
|
+
/** @description after the rental ends, where its deposit is; the return and dispute rules are the tenant's policy pages */
|
|
1765
|
+
deposit_return?: {
|
|
1766
|
+
/** @enum {string} */
|
|
1767
|
+
state: "being_returned" | "claimed" | "returned" | "disputed";
|
|
1768
|
+
amount_returned?: components["schemas"]["Money"];
|
|
1769
|
+
amount_claimed?: components["schemas"]["Money"];
|
|
1770
|
+
};
|
|
1771
|
+
cancellation?: {
|
|
1772
|
+
/** @enum {string} */
|
|
1773
|
+
by: "you" | "host" | "platform";
|
|
1774
|
+
/** Format: date-time */
|
|
1775
|
+
at: string;
|
|
1776
|
+
reason_category?: string;
|
|
1777
|
+
};
|
|
1778
|
+
/** @description the renter's own, a code (`approved`, `sent`, `missing`) */
|
|
1779
|
+
licence_standing?: string;
|
|
1780
|
+
/** @description the renter's own, a code */
|
|
1781
|
+
insurance_standing?: string;
|
|
1782
|
+
/** @description the rental's documents, counted per state; never their contents */
|
|
1783
|
+
documents?: components["schemas"]["AnchorCount"][];
|
|
1784
|
+
/** @description the rental's maintenance requests, counted per state; never their contents */
|
|
1785
|
+
maintenance?: components["schemas"]["AnchorCount"][];
|
|
1786
|
+
/** @description what cancelling now would give back, and until when those terms hold */
|
|
1787
|
+
cancel_now?: {
|
|
1788
|
+
refund?: components["schemas"]["Money"];
|
|
1789
|
+
deposit_refund?: components["schemas"]["Money"];
|
|
1790
|
+
rent_kept?: components["schemas"]["Money"];
|
|
1791
|
+
/** Format: date-time */
|
|
1792
|
+
until: string;
|
|
1793
|
+
};
|
|
1794
|
+
lease?: {
|
|
1795
|
+
/** @description the lease term, a code (`monthly`, `open_ended`) */
|
|
1796
|
+
term?: string;
|
|
1797
|
+
rate?: components["schemas"]["Money"];
|
|
1798
|
+
/** Format: date */
|
|
1799
|
+
paid_through?: string;
|
|
1800
|
+
/**
|
|
1801
|
+
* Format: date
|
|
1802
|
+
* @description the next charge date the tenant shows; not automatic billing
|
|
1803
|
+
*/
|
|
1804
|
+
next_charge?: string;
|
|
1805
|
+
};
|
|
1806
|
+
} & (unknown & unknown);
|
|
1807
|
+
AnchorCount: {
|
|
1808
|
+
state: string;
|
|
1809
|
+
count: number;
|
|
1810
|
+
};
|
|
1811
|
+
/** @description v1-draft.37, a `booking` anchor's facts (joint spec §3.1), named from the spec's prose for the tenant's projection to confirm. `amount_paid` (the money taken, before any refund) only when `payment_state` is `charged`, `paid_in_person` or `partially_refunded`, never for a hold; `amount_refunded` only when it is `partially_refunded`, `refund_pending` or `refund_settled`. An amount due is the `payment_due` deadline's `amount`. No street, support case or free-text note. */
|
|
1812
|
+
BookingFacts: {
|
|
1813
|
+
services?: {
|
|
1814
|
+
name: string;
|
|
1815
|
+
quantity?: number;
|
|
1816
|
+
duration_minutes?: number;
|
|
1817
|
+
}[];
|
|
1818
|
+
professional?: components["schemas"]["AnchorParty"];
|
|
1819
|
+
appointment?: {
|
|
1820
|
+
/** Format: date-time */
|
|
1821
|
+
at: string;
|
|
1822
|
+
zone: string;
|
|
1823
|
+
};
|
|
1824
|
+
place?: components["schemas"]["AnchorPlace"];
|
|
1825
|
+
subtotal?: components["schemas"]["Money"];
|
|
1826
|
+
fees?: components["schemas"]["Money"];
|
|
1827
|
+
total?: components["schemas"]["Money"];
|
|
1828
|
+
payment_state?: components["schemas"]["PaymentState"];
|
|
1829
|
+
amount_paid?: components["schemas"]["Money"];
|
|
1830
|
+
amount_refunded?: components["schemas"]["Money"];
|
|
1831
|
+
deposit_paid?: components["schemas"]["Money"];
|
|
1832
|
+
cancel_now?: {
|
|
1833
|
+
refund?: components["schemas"]["Money"];
|
|
1834
|
+
/** @description cancelling now goes to manual review, so no refund is promised */
|
|
1835
|
+
goes_to_review?: boolean;
|
|
1836
|
+
/** Format: date-time */
|
|
1837
|
+
until: string;
|
|
1838
|
+
};
|
|
1839
|
+
/** @enum {string} */
|
|
1840
|
+
review_state?: "not_eligible" | "eligible" | "reviewed";
|
|
1841
|
+
cancellation?: {
|
|
1842
|
+
/** @enum {string} */
|
|
1843
|
+
by: "you" | "professional" | "platform";
|
|
1844
|
+
/** Format: date-time */
|
|
1845
|
+
at: string;
|
|
1846
|
+
reason_category?: string;
|
|
1847
|
+
};
|
|
1848
|
+
} & (unknown & unknown);
|
|
1849
|
+
/** @description v1-draft.37, a `professional` anchor's facts (joint spec §3.3), named from the spec's prose for the tenant's projection to confirm. A delisted or blocked profile is `situation: unavailable`, never a stale profile. When `display_name` and the anchor's `title` differ, the `title` is what the person is shown. */
|
|
1850
|
+
ProfessionalFacts: {
|
|
1851
|
+
display_name?: string;
|
|
1852
|
+
place?: components["schemas"]["AnchorPlace"];
|
|
1853
|
+
rating?: {
|
|
1854
|
+
value: number;
|
|
1855
|
+
count: number;
|
|
1856
|
+
};
|
|
1857
|
+
services?: {
|
|
1858
|
+
id: string;
|
|
1859
|
+
name: string;
|
|
1860
|
+
duration_minutes?: number;
|
|
1861
|
+
prices?: components["schemas"]["AnchorPrices"];
|
|
1862
|
+
}[];
|
|
1863
|
+
/** @description the next open times for the service the person chose */
|
|
1864
|
+
next_openings?: {
|
|
1865
|
+
service_id: string;
|
|
1866
|
+
/** Format: date-time */
|
|
1867
|
+
at: string;
|
|
1868
|
+
zone: string;
|
|
1869
|
+
}[];
|
|
1870
|
+
};
|
|
1871
|
+
/** @description v1-draft.37, a `workspace` anchor's facts (joint spec §3.4), named from the spec's prose for the tenant's projection to confirm. */
|
|
1872
|
+
WorkspaceFacts: {
|
|
1873
|
+
place?: components["schemas"]["AnchorPlace"];
|
|
1874
|
+
host?: components["schemas"]["AnchorParty"];
|
|
1875
|
+
rates?: {
|
|
1876
|
+
day?: components["schemas"]["Money"];
|
|
1877
|
+
week?: components["schemas"]["Money"];
|
|
1878
|
+
month?: components["schemas"]["Money"];
|
|
1879
|
+
};
|
|
1880
|
+
deposit?: components["schemas"]["Money"];
|
|
1881
|
+
minimum_stay_days?: number;
|
|
1882
|
+
units?: {
|
|
1883
|
+
chairs?: number;
|
|
1884
|
+
suites?: number;
|
|
1885
|
+
};
|
|
1886
|
+
amenities?: string[];
|
|
1887
|
+
/** @description a code (`tour_first`, `no_tour`) */
|
|
1888
|
+
tour_rule?: string;
|
|
1889
|
+
/** @enum {string} */
|
|
1890
|
+
licence_requirement?: "sent" | "approved";
|
|
1891
|
+
insurance_rule?: string;
|
|
1892
|
+
/** @description the days already taken in the next 90, as ranges of whole days (`to` included), soonest first */
|
|
1893
|
+
taken_days?: {
|
|
1894
|
+
/** Format: date */
|
|
1895
|
+
from: string;
|
|
1896
|
+
/** Format: date */
|
|
1897
|
+
to: string;
|
|
1898
|
+
}[];
|
|
1899
|
+
};
|
|
1900
|
+
/** @description v1-draft.37, a `service` anchor's facts (joint spec §3.5), named from the spec's prose for the tenant's projection to confirm. */
|
|
1901
|
+
ServiceFacts: {
|
|
1902
|
+
name?: string;
|
|
1903
|
+
duration_minutes?: number;
|
|
1904
|
+
professional?: {
|
|
1905
|
+
id?: string;
|
|
1906
|
+
display_name: string;
|
|
1907
|
+
area?: string;
|
|
1908
|
+
};
|
|
1909
|
+
prices?: components["schemas"]["AnchorPrices"];
|
|
1910
|
+
offered_at?: ("at_professional" | "at_customer" | "other")[];
|
|
1911
|
+
/** @description written by the professional, so third-party text, instruction-checked before the agent reads it */
|
|
1912
|
+
description?: string;
|
|
1913
|
+
};
|
|
1914
|
+
/** @description v1-draft.37, a `class` anchor's facts (joint spec §3.6), named from the spec's prose for the tenant's projection to confirm. */
|
|
1915
|
+
ClassFacts: {
|
|
1916
|
+
professional?: components["schemas"]["AnchorParty"];
|
|
1917
|
+
place?: components["schemas"]["AnchorPlace"];
|
|
1918
|
+
price_per_seat?: components["schemas"]["Money"];
|
|
1919
|
+
/** @description written by the professional, so third-party text, instruction-checked before the agent reads it */
|
|
1920
|
+
rules?: string;
|
|
1921
|
+
/** @description written by the professional, so third-party text, instruction-checked before the agent reads it */
|
|
1922
|
+
cancellation_terms?: string;
|
|
1923
|
+
sessions?: {
|
|
1924
|
+
/** Format: date-time */
|
|
1925
|
+
at: string;
|
|
1926
|
+
zone: string;
|
|
1927
|
+
seats_left: number;
|
|
1928
|
+
cancelled: boolean;
|
|
1929
|
+
}[];
|
|
1930
|
+
};
|
|
1931
|
+
/** @description v1-draft.37, the anchor as the person and the app see it (`Session.anchor`, `session.ready.anchor`): its identity and state, and the verified `anchor` card the app swaps in for the provisional one it drew from its screen. If a fact the app showed differs, the verified card wins and the app redraws. The same card is the conversation's first timeline item. No `facts`: the card's display strings are what is shown. */
|
|
1932
|
+
SessionAnchorView: {
|
|
1933
|
+
type: components["schemas"]["AnchorType"];
|
|
1934
|
+
id: string;
|
|
1935
|
+
title: string;
|
|
1936
|
+
/** Format: date-time */
|
|
1937
|
+
as_of?: string;
|
|
1938
|
+
situation?: string;
|
|
1939
|
+
/** @enum {string} */
|
|
1940
|
+
completeness: "complete" | "partial" | "unavailable";
|
|
1941
|
+
/** @description the anchor's eligible intents, for the chips (only with the `intents` capability) */
|
|
1942
|
+
intents?: components["schemas"]["AnchorIntent"][];
|
|
1943
|
+
card: components["schemas"]["Card"];
|
|
1944
|
+
};
|
|
1945
|
+
/** @description v1-draft.37, an `anchor` card's body: display only. The object's type, when it was read (absent when the read failed), and the anchor's `display` as the tenant formatted it: at most four facts as display strings and the `deep_link` to the object's screen, which must pass the deep-link rule (admin-v1 `Connector.deep_link_prefixes`); a card whose link fails keeps the card and loses the link. The card's `subtitle` is `display.subtitle`. An anchor with no `display` gets a card with its title and no facts. */
|
|
1946
|
+
AnchorCard: {
|
|
1947
|
+
anchor_type: components["schemas"]["AnchorType"];
|
|
1948
|
+
/** Format: date-time */
|
|
1949
|
+
as_of?: string;
|
|
1950
|
+
facts: {
|
|
1951
|
+
/** @description in Unicode code points */
|
|
1952
|
+
label: string;
|
|
1953
|
+
/** @description in Unicode code points */
|
|
1954
|
+
value: string;
|
|
1955
|
+
}[];
|
|
1956
|
+
deep_link?: string;
|
|
1957
|
+
};
|
|
1958
|
+
/** @description v1-draft.37, an `open_action` card's body: a hand-off to the tenant's own flow for an eligible `action` intent. The app opens `route` with `params`; **opening a screen is never doing the action**. The app reports what happened with `action.result`, echoing `action_id`, and the gateway re-reads the anchor before the agent states the outcome. `action_id` is minted by the gateway, one per hand-off across its retries: the tenant's write keys on it, so a double tap or a network retry is one action. `terms_digest` is the hash of the terms the person was shown; the tenant's write refuses changed terms. A build without the `open_action` capability gets `fallback_link` (the object's screen) as a plain link instead. */
|
|
1959
|
+
OpenAction: {
|
|
1960
|
+
action_id: string;
|
|
1961
|
+
intent: components["schemas"]["IntentId"];
|
|
1962
|
+
/** @description in Unicode code points */
|
|
1963
|
+
label: string;
|
|
1964
|
+
/** @description a route the connector manifest declares (admin-v1 `Connector.actions.routes`) */
|
|
1965
|
+
route: string;
|
|
1966
|
+
/** @description the route's typed params, as its manifest entry declares them: `string` and `id` as strings, `instant` as an RFC 3339 string, `integer` as an integer, `money` as `Money` */
|
|
1967
|
+
params: {
|
|
1968
|
+
[key: string]: string | number | components["schemas"]["Money"];
|
|
1969
|
+
};
|
|
1970
|
+
terms_digest?: string;
|
|
1971
|
+
/** Format: date-time */
|
|
1972
|
+
expires_at: string;
|
|
1973
|
+
/** @description the object's screen; passes the deep-link rule */
|
|
1974
|
+
fallback_link: string;
|
|
1975
|
+
};
|
|
1976
|
+
/** @description v1-draft.37, optional on `createSession`: what the person's app build supports, and the starter chips it showed, as its backend relays them. `shown_intents` are the intent ids of the chips on screen when the chat opened: with the `intent` a tap sends on `input.text`, they tell which chips a person saw and which they tapped. Only the ids are kept. Capabilities: `anchor_card`: it draws an `anchor` card. `intents`: it draws chips from anchor intent ids and sends `intent` on `input.text`. `open_action`: it draws an `open_action` card and opens its route. `action_result`: it sends `action.result` after a hand-off. Open: an unknown value is ignored, never refused. The gateway leaves out what the build lacks: no `open_action` means the action's `fallback_link` as a plain `links` card, no `intents` means the chips come as text, and a build with none still gets the anchored greeting and answers. */
|
|
1977
|
+
SessionClient: {
|
|
1978
|
+
/**
|
|
1979
|
+
* @example [
|
|
1980
|
+
* "anchor_card",
|
|
1981
|
+
* "intents",
|
|
1982
|
+
* "open_action",
|
|
1983
|
+
* "action_result"
|
|
1984
|
+
* ]
|
|
1985
|
+
*/
|
|
1986
|
+
capabilities?: string[];
|
|
1987
|
+
/** @description the starter chips' intent ids, open like capabilities (an id the session's anchor does not list is kept as given) */
|
|
1988
|
+
shown_intents?: components["schemas"]["IntentId"][];
|
|
1989
|
+
};
|
|
1990
|
+
/** @description v1-draft.37, optional on `createSession`: how the person opened the chat. `point` is an open code: `ask_about` for an explicit "ask about this" on a page (it starts a new conversation anchored to the page's object), and `help`, `launcher`, `inbox`, `history`, `explore` or `setup` for the others; an unknown one is treated as `help`. `label` keeps the app's own word for analytics only: it never reaches a model prompt. */
|
|
1991
|
+
SessionEntry: {
|
|
1992
|
+
/** @example ask_about */
|
|
1993
|
+
point: string;
|
|
1994
|
+
/** @description in Unicode code points */
|
|
1995
|
+
label?: string;
|
|
1996
|
+
};
|
|
1997
|
+
/** @description v1-draft.25, what `getMeta` answers */
|
|
1998
|
+
Meta: {
|
|
1999
|
+
/** @example v1-draft.26 */
|
|
2000
|
+
api_version: string;
|
|
2001
|
+
contracts: {
|
|
2002
|
+
/** @description the vinaverse-contracts commit pinned */
|
|
2003
|
+
commit?: string;
|
|
2004
|
+
};
|
|
2005
|
+
};
|
|
1515
2006
|
/** @description v1-draft.20: a tap target the app draws under the welcome. Tapping it sends `message` as the person's own text (an `input.text`, or `createTurnSse`), exactly as if they typed it; it starts nothing else. */
|
|
1516
2007
|
Chip: {
|
|
1517
2008
|
/** @description in Unicode code points */
|
|
@@ -1569,6 +2060,12 @@ interface components {
|
|
|
1569
2060
|
screen_context?: components["schemas"]["ScreenContext"];
|
|
1570
2061
|
/** @description v1-draft.20, absent when the tenant's manifest has no welcome for the session's mode */
|
|
1571
2062
|
welcome?: components["schemas"]["Welcome"];
|
|
2063
|
+
/** @description v1-draft.27, whether the agent remembers the person, and the notice to show once */
|
|
2064
|
+
memory?: components["schemas"]["SessionMemory"];
|
|
2065
|
+
/** @description v1-draft.37, what the chat is about, with its verified card, when `createSession` gave an anchor */
|
|
2066
|
+
anchor?: components["schemas"]["SessionAnchorView"];
|
|
2067
|
+
/** @description v1-draft.40, the chat experience at session start, resolved (`ChatExperience`) */
|
|
2068
|
+
experience?: components["schemas"]["ChatExperience"];
|
|
1572
2069
|
};
|
|
1573
2070
|
SessionStatus: {
|
|
1574
2071
|
id: string;
|
|
@@ -1592,6 +2089,8 @@ interface components {
|
|
|
1592
2089
|
TurnInput: {
|
|
1593
2090
|
client_event_id?: string;
|
|
1594
2091
|
text: string;
|
|
2092
|
+
/** @description v1-draft.37, optional, as on `input.text` */
|
|
2093
|
+
intent?: components["schemas"]["IntentId"];
|
|
1595
2094
|
};
|
|
1596
2095
|
Usage: {
|
|
1597
2096
|
/** @enum {string} */
|
|
@@ -1653,12 +2152,15 @@ interface components {
|
|
|
1653
2152
|
/** @enum {string} */
|
|
1654
2153
|
purpose: "help" | "support" | "policy" | "contact" | "feedback";
|
|
1655
2154
|
};
|
|
1656
|
-
/** @description v1-draft.20, on a `links` card: the tenant's scope policy, at the version in force, that kept the agent from answering, and why. */
|
|
2155
|
+
/** @description v1-draft.20, on a `links` card: the tenant's scope policy, at the version in force, that kept the agent from answering, and why. v1-draft.37: `policy_id` and `version` are required for the scope reasons and may be absent for `help`, which no scope policy decides. */
|
|
1657
2156
|
ScopeProvenance: {
|
|
1658
|
-
policy_id
|
|
1659
|
-
version
|
|
1660
|
-
/**
|
|
1661
|
-
|
|
2157
|
+
policy_id?: string;
|
|
2158
|
+
version?: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* @description why the card is shown: the scope kept the agent from answering (`off_scope`, `competitor`, `blocked_topic`), or the person asked how to reach the business or how to do something no tool answers (`help`, v1-draft.36)
|
|
2161
|
+
* @enum {string}
|
|
2162
|
+
*/
|
|
2163
|
+
reason: "off_scope" | "competitor" | "blocked_topic" | "help";
|
|
1662
2164
|
};
|
|
1663
2165
|
/**
|
|
1664
2166
|
* @description `ref` is present on every customer-agent card (professional … handoff); copilot cards (metric_chart … document) may omit it, since a metric, cluster or claim is not a tenant object. A `question` card (guided flows) carries `question`, has no `actions` (the person answers with `ui.answer`), uses `title` as a short label for the question, and its `source` names the tool call that fetched the flow's definition.
|
|
@@ -1682,16 +2184,20 @@ interface components {
|
|
|
1682
2184
|
*
|
|
1683
2185
|
* **Listing cards** (v1-draft.20). A `professional` or `workspace` card may carry `images` (up to five, the first the hero; `image_url`, when present, is the first one's URL, for clients that predate `images`), `next_available` (the earliest open time the tenant's tool returned; a hint, so a tap on its time reads availability again), `price_from` and a `group`. An app draws one hero image first and the rest on a swipe.
|
|
1684
2186
|
* **A `links` card** (v1-draft.20) answers what the tenant's scope keeps the agent from answering: a question off its scope, a comparison with a competitor, a blocked topic. Its `links` are the tenant's own help, support, policy, contact or feedback destinations (`CardLink`), its `provenance` names the scope policy and the reason, and it has no `actions`: each link opens the tenant's page. It belongs to a recorded turn, with the agent's one line around it, never to `input.rejected`. Its `source.tool` is `scope` and its `source.call_id` the turn's id: no tool call made it. An earlier client skips the unknown kind, as it skips any.
|
|
2187
|
+
* **An `anchor` card** (v1-draft.37) shows what a context-started chat is about: `title` (at most 80 code points) and its `anchor` body (`AnchorCard`): display only, no `actions`. Its `source.tool` is `anchor` and its `source.call_id` the anchor read that made it (`session` for the anchor `createSession` carried). It is `Session.anchor.card` and the conversation's first timeline item.
|
|
2188
|
+
* **An `open_action` card** (v1-draft.37) hands an eligible `action` intent to the tenant's own flow (`OpenAction`), with no `actions` of its own: the app opens its `route`. A build without the `open_action` capability never gets one; it gets the action's `fallback_link` as a `links` card.
|
|
1685
2189
|
*/
|
|
1686
2190
|
Card: {
|
|
1687
2191
|
id: string;
|
|
1688
2192
|
/**
|
|
1689
|
-
* @description customer-agent kinds, then business-copilot kinds (Studio), then `question` (guided flows), then `proposal` (a change the person confirms or declines in the tenant's app), then `next_step` (a step the person finishes on the tenant's own screen), then `links` (v1-draft.20: the tenant's own pages, when its scope keeps the agent from answering)
|
|
2193
|
+
* @description customer-agent kinds, then business-copilot kinds (Studio), then `question` (guided flows), then `proposal` (a change the person confirms or declines in the tenant's app), then `next_step` (a step the person finishes on the tenant's own screen), then `links` (v1-draft.20: the tenant's own pages, when its scope keeps the agent from answering), then `anchor` and `open_action` (v1-draft.37: what a context-started chat is about, and a hand-off to the tenant's own flow)
|
|
1690
2194
|
* @enum {string}
|
|
1691
2195
|
*/
|
|
1692
|
-
kind: "professional" | "workspace" | "service" | "time_slots" | "booking" | "quote" | "policy" | "handoff" | "metric_chart" | "metric_table" | "gap_list" | "cluster" | "claim" | "document" | "question" | "proposal" | "next_step" | "links";
|
|
2196
|
+
kind: "professional" | "workspace" | "service" | "time_slots" | "booking" | "quote" | "policy" | "handoff" | "metric_chart" | "metric_table" | "gap_list" | "cluster" | "claim" | "document" | "question" | "proposal" | "next_step" | "links" | "anchor" | "open_action";
|
|
1693
2197
|
question?: components["schemas"]["Question"];
|
|
1694
2198
|
proposal?: components["schemas"]["Proposal"];
|
|
2199
|
+
anchor?: components["schemas"]["AnchorCard"];
|
|
2200
|
+
open_action?: components["schemas"]["OpenAction"];
|
|
1695
2201
|
ref?: components["schemas"]["CardRef"];
|
|
1696
2202
|
title: string;
|
|
1697
2203
|
subtitle?: string;
|
|
@@ -1699,6 +2205,8 @@ interface components {
|
|
|
1699
2205
|
image_url?: string;
|
|
1700
2206
|
/** @description v1-draft.20, a `professional` or `workspace` card's photos, the first the hero */
|
|
1701
2207
|
images?: components["schemas"]["CardImage"][];
|
|
2208
|
+
/** @description v1-draft.29, on a `time_slots` or `professional` card only: what the person asked to be passed to the professional, in their own words and language, carried with this card's hand-off (`select_slot`, or the `open` action) for the app to prefill its checkout note, which the person can still edit. An app whose checkout has no note ignores it. Plain text, never markup. */
|
|
2209
|
+
booking_note?: string;
|
|
1702
2210
|
/**
|
|
1703
2211
|
* Format: date-time
|
|
1704
2212
|
* @description v1-draft.20, a `professional` or `workspace` card's earliest open time, as the tenant's tool returned it
|
|
@@ -1780,7 +2288,8 @@ interface components {
|
|
|
1780
2288
|
area: string;
|
|
1781
2289
|
demand: number;
|
|
1782
2290
|
supply: number;
|
|
1783
|
-
|
|
2291
|
+
/** @description v1-draft.33: null when fewer than the metric's k_floor distinct people are behind the zero results, whatever the cell's demand (a subgroup is released only on its own people) */
|
|
2292
|
+
zero_result_share_ppm: number | null;
|
|
1784
2293
|
trend_ppm?: number | null;
|
|
1785
2294
|
}[];
|
|
1786
2295
|
label?: string;
|
|
@@ -1788,7 +2297,7 @@ interface components {
|
|
|
1788
2297
|
share_ppm?: number;
|
|
1789
2298
|
/** @enum {string} */
|
|
1790
2299
|
outcome?: "zero_results" | "withheld" | "handoff" | "mixed";
|
|
1791
|
-
/** @description redacted */
|
|
2300
|
+
/** @description Not sent since v1-draft.33: an `intent_cluster` card carries its label and counts only. Customer questions, even redacted, can name a person or a health matter. */
|
|
1792
2301
|
examples?: string[];
|
|
1793
2302
|
claim?: {
|
|
1794
2303
|
id: string;
|
|
@@ -1814,7 +2323,7 @@ interface components {
|
|
|
1814
2323
|
snippet?: string;
|
|
1815
2324
|
/** Format: date-time */
|
|
1816
2325
|
updated_at?: string;
|
|
1817
|
-
} & (unknown & unknown & unknown & unknown);
|
|
2326
|
+
} & (unknown & unknown & unknown & unknown & unknown & unknown & unknown);
|
|
1818
2327
|
/** @enum {string} */
|
|
1819
2328
|
ValueUnit: "count" | "ppm" | "micros_usd" | "ms";
|
|
1820
2329
|
MetricRef: {
|
|
@@ -2059,7 +2568,7 @@ interface components {
|
|
|
2059
2568
|
data: components["schemas"]["ConversationSummary"][];
|
|
2060
2569
|
next_cursor: string | null;
|
|
2061
2570
|
};
|
|
2062
|
-
/** @description v1-draft.21: one past conversation as a history screen lists it.
|
|
2571
|
+
/** @description v1-draft.21: one past conversation as a history screen lists it. The title is from the conversation's last search intent or its date, never the person's words. v1-draft.37: an anchored conversation carries `anchor` (its type and title, so a history screen groups by it with no other call), and any conversation may carry `last_message`, a short preview of its last message. */
|
|
2063
2572
|
ConversationSummary: {
|
|
2064
2573
|
id: components["schemas"]["ConversationId"];
|
|
2065
2574
|
agent: string;
|
|
@@ -2082,15 +2591,27 @@ interface components {
|
|
|
2082
2591
|
* @enum {string}
|
|
2083
2592
|
*/
|
|
2084
2593
|
state: "open" | "ended";
|
|
2594
|
+
/** @description v1-draft.37, what an anchored conversation is about: the anchor's type and its title as the person saw it (`SessionAnchor.title`), never message text. History groups conversations by it. */
|
|
2595
|
+
anchor?: {
|
|
2596
|
+
kind: components["schemas"]["AnchorType"];
|
|
2597
|
+
title: string;
|
|
2598
|
+
};
|
|
2599
|
+
/** @description v1-draft.37, a preview of the conversation's last message, at most 120 code points, cut at a word with an ellipsis, made from the message as the timeline stores it: after digit masking and redaction, never from a withheld sentence. Never a refused message (`refusal: true`), and absent under the tenant's `transcript_retention` `none`. */
|
|
2600
|
+
last_message?: {
|
|
2601
|
+
/** @enum {string} */
|
|
2602
|
+
role: "person" | "assistant" | "staff";
|
|
2603
|
+
text: string;
|
|
2604
|
+
};
|
|
2085
2605
|
};
|
|
2086
2606
|
TimelinePage: {
|
|
2607
|
+
conversation: components["schemas"]["ConversationSummary"];
|
|
2087
2608
|
data: components["schemas"]["TimelineItem"][];
|
|
2088
2609
|
/** @description the next older page; null at the conversation's start */
|
|
2089
2610
|
next_cursor: string | null;
|
|
2090
2611
|
};
|
|
2091
2612
|
/**
|
|
2092
2613
|
* @description v1-draft.21: one item of a past conversation, a message or a card its turn drew. `id` is stable and unique within the conversation; a message's `event_id` is its live event's identifier (`TranscriptItem.id`), the key an app merges live and resumed messages by, with `role`. A card is read-only in history.
|
|
2093
|
-
* Unlike `session.ready.transcript`, the history holds
|
|
2614
|
+
* Unlike `session.ready.transcript`, the history holds the turns the tenant's scope refused (a competitor, a blocked topic, a strictly off-scope question): the person's message and the fixed line said instead of an answer both carry `refusal: true`, so the app draws them as it drew them live (muted, never offered again). An input a guardrail blocks (an instruction override, an attempt to extract the prompt or keys, a persona hijack) is never recorded and is in no history (v1-draft.26): attack text is not kept in a person's history. A `proposal` card carries `proposal_outcome`, what became of it.
|
|
2094
2615
|
*/
|
|
2095
2616
|
TimelineItem: {
|
|
2096
2617
|
/** @constant */
|
|
@@ -2109,16 +2630,18 @@ interface components {
|
|
|
2109
2630
|
turn_id?: string;
|
|
2110
2631
|
/** @description `assistant` only, present only when true: the reply stopped before it finished */
|
|
2111
2632
|
interrupted?: boolean;
|
|
2633
|
+
/** @description v1-draft.40, `assistant` only: the person's current rating and reaction, absent when there is none */
|
|
2634
|
+
feedback?: components["schemas"]["MessageFeedback"];
|
|
2112
2635
|
/**
|
|
2113
|
-
* @description Present only when true:
|
|
2636
|
+
* @description Present only when true: the tenant's scope refused this turn. On a `person` message, the text it refused (as recorded, card-like digits masked); on an `assistant` message, the fixed line said instead of an answer. An input a guardrail blocks is never recorded, so it never appears here.
|
|
2114
2637
|
* @constant
|
|
2115
2638
|
*/
|
|
2116
2639
|
refusal?: true;
|
|
2117
|
-
} | {
|
|
2640
|
+
} | ({
|
|
2118
2641
|
/** @constant */
|
|
2119
2642
|
type: "card";
|
|
2120
2643
|
id: string;
|
|
2121
|
-
turn_id
|
|
2644
|
+
turn_id?: string;
|
|
2122
2645
|
/** Format: date-time */
|
|
2123
2646
|
at: string;
|
|
2124
2647
|
card: components["schemas"]["Card"];
|
|
@@ -2127,11 +2650,53 @@ interface components {
|
|
|
2127
2650
|
* @enum {string}
|
|
2128
2651
|
*/
|
|
2129
2652
|
proposal_outcome?: "pending" | "confirmed" | "declined" | "failed" | "expired";
|
|
2130
|
-
};
|
|
2653
|
+
} & unknown);
|
|
2131
2654
|
ConversationDeleted: {
|
|
2132
2655
|
conversation_id: components["schemas"]["ConversationId"];
|
|
2133
2656
|
sessions_revoked: number;
|
|
2134
2657
|
};
|
|
2658
|
+
/** @example memory-2026-10 */
|
|
2659
|
+
MemoryNoticeVersion: string;
|
|
2660
|
+
/** @description v1-draft.27: the one-time notice that the agent remembers the person across conversations, in the subject's language, written by Vinaverse. Show it once with two choices: dismiss it (`acknowledgeMemoryNotice`) or turn memory off (`putSubjectMemory` with `remembered: false`), both through the tenant's backend. */
|
|
2661
|
+
MemoryNotice: {
|
|
2662
|
+
version: components["schemas"]["MemoryNoticeVersion"];
|
|
2663
|
+
/** @description in Unicode code points */
|
|
2664
|
+
text: string;
|
|
2665
|
+
};
|
|
2666
|
+
/** @description v1-draft.27: whether the agent remembers this person across conversations in this session, and the notice to show while they have not acknowledged its current version. `notice` is absent once acknowledged, when memory is off, and for a guest (a guest is never remembered). */
|
|
2667
|
+
SessionMemory: {
|
|
2668
|
+
remembered: boolean;
|
|
2669
|
+
notice?: components["schemas"]["MemoryNotice"];
|
|
2670
|
+
};
|
|
2671
|
+
MemorySource: {
|
|
2672
|
+
conversation_id: components["schemas"]["ConversationId"];
|
|
2673
|
+
/** Format: date-time */
|
|
2674
|
+
at: string;
|
|
2675
|
+
};
|
|
2676
|
+
/** @description v1-draft.27: one thing the person asked the agent to remember ("remember that I prefer mornings"), in the words the agent said back to the person, never inferred. Never a health fact or a never-store detail; a fact about someone else ("my daughter prefers short hair") is the person's own note (v1-draft.39). */
|
|
2677
|
+
MemoryPreference: {
|
|
2678
|
+
id: string;
|
|
2679
|
+
text: string;
|
|
2680
|
+
source: components["schemas"]["MemorySource"];
|
|
2681
|
+
};
|
|
2682
|
+
/** @description v1-draft.27: the last open search intent, as the search resolved it (a catalogue service's name, a place's name), never the person's words; kept 7 days from `at`. */
|
|
2683
|
+
LastSearch: {
|
|
2684
|
+
service?: string;
|
|
2685
|
+
area?: string;
|
|
2686
|
+
/** Format: date-time */
|
|
2687
|
+
at: string;
|
|
2688
|
+
source: components["schemas"]["MemorySource"];
|
|
2689
|
+
};
|
|
2690
|
+
SubjectMemoryChoice: {
|
|
2691
|
+
/** @description `false`: "don't remember me", on both sides of the app */
|
|
2692
|
+
remembered: boolean;
|
|
2693
|
+
};
|
|
2694
|
+
SubjectMemory: {
|
|
2695
|
+
remembered: boolean;
|
|
2696
|
+
notice_acknowledged?: components["schemas"]["MemoryNoticeVersion"];
|
|
2697
|
+
preferences: components["schemas"]["MemoryPreference"][];
|
|
2698
|
+
last_search?: components["schemas"]["LastSearch"];
|
|
2699
|
+
};
|
|
2135
2700
|
/** @description A time slot the person picked on a `time_slots` card (v1-draft.17, `docs/realtime-protocol.md` §6): the slot's `id`, and the `call_id` of the tool call the card came from (the card's `source.call_id`), so the runtime checks the pick against the evidence it holds for that call. Both are copied from the card; never built by the app. */
|
|
2136
2701
|
SlotSelection: {
|
|
2137
2702
|
id: string;
|
|
@@ -2266,6 +2831,8 @@ interface components {
|
|
|
2266
2831
|
type: "input.text";
|
|
2267
2832
|
client_event_id?: string;
|
|
2268
2833
|
text: string;
|
|
2834
|
+
/** @description v1-draft.37, optional: the anchor intent a chip carries, sent with the chip's text. Eligible now, an `action` intent gets its `open_action` card and an `explain` intent the manifest's template answer, with no model call; no longer eligible, the agent says what changed and offers the new intents; an intent the session's anchor does not list is treated as the text alone. */
|
|
2835
|
+
intent?: components["schemas"]["IntentId"];
|
|
2269
2836
|
} | {
|
|
2270
2837
|
/** @constant */
|
|
2271
2838
|
type: "input.cancel";
|
|
@@ -2295,6 +2862,14 @@ interface components {
|
|
|
2295
2862
|
card_id: string;
|
|
2296
2863
|
question_id: components["schemas"]["QuestionId"];
|
|
2297
2864
|
answer: components["schemas"]["AnswerInput"];
|
|
2865
|
+
} | {
|
|
2866
|
+
/** @constant */
|
|
2867
|
+
type: "action.result";
|
|
2868
|
+
client_event_id?: string;
|
|
2869
|
+
card_id: string;
|
|
2870
|
+
action_id: string;
|
|
2871
|
+
/** @enum {string} */
|
|
2872
|
+
outcome: "completed" | "cancelled" | "failed" | "unknown";
|
|
2298
2873
|
} | {
|
|
2299
2874
|
/** @constant */
|
|
2300
2875
|
type: "ping";
|
|
@@ -2316,6 +2891,12 @@ interface components {
|
|
|
2316
2891
|
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
2317
2892
|
/** @description v1-draft.20, present when the session acts for a business */
|
|
2318
2893
|
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
2894
|
+
/** @description v1-draft.27, as `Session.memory`, so an app that reconnects still shows an unacknowledged notice */
|
|
2895
|
+
memory?: components["schemas"]["SessionMemory"];
|
|
2896
|
+
/** @description v1-draft.37, as `Session.anchor`, refreshed when the session's anchor was re-read */
|
|
2897
|
+
anchor?: components["schemas"]["SessionAnchorView"];
|
|
2898
|
+
/** @description v1-draft.40, as `Session.experience`: the value at session start, the same on every reconnect of the session */
|
|
2899
|
+
experience?: components["schemas"]["ChatExperience"];
|
|
2319
2900
|
/**
|
|
2320
2901
|
* @description Optional. The last messages of the conversation, oldest first, text only, so the app can redraw it after a kill or a reconnect. Older context is not sent.
|
|
2321
2902
|
* A guided flow's resumed `session.ready` always carries it. Any other session's (a chat; v1-draft.17) carries it when `resumed` is true and there is something to restore, whether the app reconnects to the same session or the backend created a new session of the conversation: - the conversation's messages across its sessions (the session's own when it has no conversation):
|
|
@@ -2358,9 +2939,12 @@ interface components {
|
|
|
2358
2939
|
/** @constant */
|
|
2359
2940
|
type: "tool.status";
|
|
2360
2941
|
turn_id: string;
|
|
2942
|
+
/** @description the step's words for builds before v1-draft.40; a newer client draws `step` */
|
|
2361
2943
|
label: string;
|
|
2362
2944
|
/** @enum {string} */
|
|
2363
2945
|
state: "running" | "done" | "failed";
|
|
2946
|
+
/** @description v1-draft.40, the named working step; absent from a server that predates it */
|
|
2947
|
+
step?: components["schemas"]["ToolStep"];
|
|
2364
2948
|
} | {
|
|
2365
2949
|
/** @constant */
|
|
2366
2950
|
type: "message.delta";
|
|
@@ -2376,6 +2960,7 @@ interface components {
|
|
|
2376
2960
|
/** @constant */
|
|
2377
2961
|
type: "message.completed";
|
|
2378
2962
|
turn_id: string;
|
|
2963
|
+
/** @description v1-draft.30: the turn's reply. It may leave out sentences streamed in a step that ended in a tool call; show it in place of the turn's streamed `message.delta` texts. */
|
|
2379
2964
|
text: string;
|
|
2380
2965
|
/** @description optional; spans of `text` with their source card or tool call */
|
|
2381
2966
|
citations?: components["schemas"]["Citation"][];
|
|
@@ -2606,7 +3191,10 @@ interface components {
|
|
|
2606
3191
|
threshold_policy?: string;
|
|
2607
3192
|
policy_version: string;
|
|
2608
3193
|
model: {
|
|
2609
|
-
id:
|
|
3194
|
+
id: components["schemas"]["ModelName"];
|
|
3195
|
+
/** @description what a person reads for `id`, such as "Vinaverse Language 0.1" (v1-draft.35) */
|
|
3196
|
+
label?: string;
|
|
3197
|
+
/** @description `vinaverse` for a Vinaverse model (v1-draft.34) */
|
|
2610
3198
|
provider: string;
|
|
2611
3199
|
revision?: string;
|
|
2612
3200
|
};
|
|
@@ -2873,11 +3461,543 @@ interface components {
|
|
|
2873
3461
|
text: string;
|
|
2874
3462
|
};
|
|
2875
3463
|
};
|
|
2876
|
-
|
|
3464
|
+
/**
|
|
3465
|
+
* @description v1-draft.40, the preset a tenant starts from: `minimal` (a quiet support chat), `standard` (a calm concierge, the default) or `rich` (a messaging-first companion). The values of each are in `fixtures/api/experience/valid/presets.json`.
|
|
3466
|
+
* @enum {string}
|
|
3467
|
+
*/
|
|
3468
|
+
ChatPreset: "minimal" | "standard" | "rich";
|
|
3469
|
+
/**
|
|
3470
|
+
* @description v1-draft.40 (VIN-115, the chat spec's module G): how the in-app chat behaves for one agent, as the tenant set
|
|
3471
|
+
* it in Studio. Every field is optional: a field absent is the kit's own default (the `standard` preset), so an
|
|
3472
|
+
* app built before a field existed keeps working, except a field the gateway enforces (`edit`, `regenerate`,
|
|
3473
|
+
* `versions`, `fork`, `pins` stored on the server, `summary`), which resolves off when absent. That is about the
|
|
3474
|
+
* resolved value; in a setting's `overrides` an absent field is the preset's value. A client ignores a field it
|
|
3475
|
+
* does not know.
|
|
3476
|
+
*
|
|
3477
|
+
* **Resolved, not raw.** Inside a conversation the value is resolved: the tenant's preset with its changes
|
|
3478
|
+
* (admin-v1 `ChatExperienceSetting`), narrowed by what this server serves (a feature it does not serve yet
|
|
3479
|
+
* resolves off) and, where a field says so, by `createSession.client.capabilities`. The kit narrows it again
|
|
3480
|
+
* with the app's own choices, then with the message's state (Try again on a booking reply is never offered);
|
|
3481
|
+
* it never widens it.
|
|
3482
|
+
*
|
|
3483
|
+
* **What it cannot change** (spec G TC-05): the AI disclosure, the phone's Reduce Motion and text size, contrast
|
|
3484
|
+
* floors, performance budgets, the money and deadline rules, no edit, Try again or fork across a commitment,
|
|
3485
|
+
* and the privacy floors. None of those is a field here. Turning a feature off never hides or erases what
|
|
3486
|
+
* exists: forks, pins, reactions and versions already made stay readable.
|
|
3487
|
+
*
|
|
3488
|
+
* Attachments (spec K) are a separate group, added with the attachments contract.
|
|
3489
|
+
*/
|
|
3490
|
+
ChatExperience: {
|
|
3491
|
+
preset?: components["schemas"]["ChatPreset"];
|
|
3492
|
+
header?: {
|
|
3493
|
+
/**
|
|
3494
|
+
* @description default `per_mode`
|
|
3495
|
+
* @enum {string}
|
|
3496
|
+
*/
|
|
3497
|
+
style?: "neutral" | "brand" | "per_mode";
|
|
3498
|
+
/** @description the "About Riley" line; default true */
|
|
3499
|
+
context?: boolean;
|
|
3500
|
+
};
|
|
3501
|
+
avatar?: {
|
|
3502
|
+
/**
|
|
3503
|
+
* @description default `last_of_run`
|
|
3504
|
+
* @enum {string}
|
|
3505
|
+
*/
|
|
3506
|
+
in_thread?: "last_of_run" | "every" | "off";
|
|
3507
|
+
};
|
|
3508
|
+
anchor?: {
|
|
3509
|
+
/** @description a compact strip once the anchor card scrolls away; default true */
|
|
3510
|
+
pin_strip?: boolean;
|
|
3511
|
+
};
|
|
3512
|
+
composer?: {
|
|
3513
|
+
/**
|
|
3514
|
+
* @description default `dictation`
|
|
3515
|
+
* @enum {string}
|
|
3516
|
+
*/
|
|
3517
|
+
voice?: "off" | "dictation" | "live";
|
|
3518
|
+
};
|
|
3519
|
+
/**
|
|
3520
|
+
* @description default `outcomes`
|
|
3521
|
+
* @enum {string}
|
|
3522
|
+
*/
|
|
3523
|
+
haptics?: "off" | "outcomes" | "selection_and_outcomes";
|
|
3524
|
+
/** @description voice and notifications only; default false */
|
|
3525
|
+
sound?: boolean;
|
|
3526
|
+
language?: {
|
|
3527
|
+
/**
|
|
3528
|
+
* @description default `app_locale`
|
|
3529
|
+
* @enum {string}
|
|
3530
|
+
*/
|
|
3531
|
+
chips?: "app_locale" | "person_language";
|
|
3532
|
+
};
|
|
3533
|
+
/** @description the working line (spec A AS-10 to AS-12) */
|
|
3534
|
+
working?: {
|
|
3535
|
+
/**
|
|
3536
|
+
* @description `glance` shows "Working on it…" only; `steps` names the step (default); `steps_expandable` adds the step list
|
|
3537
|
+
* @enum {string}
|
|
3538
|
+
*/
|
|
3539
|
+
detail?: "glance" | "steps" | "steps_expandable";
|
|
3540
|
+
/** @description "Still checking…" after; default 4 */
|
|
3541
|
+
slow_after_s?: number;
|
|
3542
|
+
/** @description "Taking longer" and Stop after; default 12 */
|
|
3543
|
+
stop_after_s?: number;
|
|
3544
|
+
/** @description the state glyph on the agent's mark; default true */
|
|
3545
|
+
glyph?: boolean;
|
|
3546
|
+
};
|
|
3547
|
+
thinking?: {
|
|
3548
|
+
/**
|
|
3549
|
+
* @description default `dots`
|
|
3550
|
+
* @enum {string}
|
|
3551
|
+
*/
|
|
3552
|
+
indicator?: "dots" | "text" | "off";
|
|
3553
|
+
};
|
|
3554
|
+
stream?: {
|
|
3555
|
+
/**
|
|
3556
|
+
* @description default `paced`
|
|
3557
|
+
* @enum {string}
|
|
3558
|
+
*/
|
|
3559
|
+
reveal?: "paced" | "sentence" | "whole_reply";
|
|
3560
|
+
/** @description default true */
|
|
3561
|
+
caret?: boolean;
|
|
3562
|
+
};
|
|
3563
|
+
motion?: {
|
|
3564
|
+
/**
|
|
3565
|
+
* @description `calm` uses crossfades only; default `standard`
|
|
3566
|
+
* @enum {string}
|
|
3567
|
+
*/
|
|
3568
|
+
level?: "calm" | "standard";
|
|
3569
|
+
};
|
|
3570
|
+
send?: {
|
|
3571
|
+
/**
|
|
3572
|
+
* @description default `full`
|
|
3573
|
+
* @enum {string}
|
|
3574
|
+
*/
|
|
3575
|
+
states?: "full" | "failures_only";
|
|
3576
|
+
};
|
|
3577
|
+
/**
|
|
3578
|
+
* @description default `off`
|
|
3579
|
+
* @enum {string}
|
|
3580
|
+
*/
|
|
3581
|
+
receipts?: "off" | "delivered";
|
|
3582
|
+
skeleton?: {
|
|
3583
|
+
/**
|
|
3584
|
+
* @description `quiet` never pulses; default `shaped`
|
|
3585
|
+
* @enum {string}
|
|
3586
|
+
*/
|
|
3587
|
+
style?: "shaped" | "quiet";
|
|
3588
|
+
};
|
|
3589
|
+
/** @description result cards (spec B) */
|
|
3590
|
+
cards?: {
|
|
3591
|
+
/** @description the card kinds drawn; absent in a setting: every kind the connector supports when it is saved (stored as that list, so a kind added later stays off). Open: an unknown kind is ignored */
|
|
3592
|
+
kinds?: string[];
|
|
3593
|
+
layout?: {
|
|
3594
|
+
/**
|
|
3595
|
+
* @description default `list`
|
|
3596
|
+
* @enum {string}
|
|
3597
|
+
*/
|
|
3598
|
+
decision?: "list" | "strip";
|
|
3599
|
+
/**
|
|
3600
|
+
* @description default `strip`
|
|
3601
|
+
* @enum {string}
|
|
3602
|
+
*/
|
|
3603
|
+
browse?: "strip" | "list";
|
|
3604
|
+
};
|
|
3605
|
+
/** @description the default form per card kind; absent kinds follow the layout rule */
|
|
3606
|
+
form?: {
|
|
3607
|
+
[key: string]: "row" | "tile" | "expanded";
|
|
3608
|
+
};
|
|
3609
|
+
/**
|
|
3610
|
+
* @description default `photo_first`
|
|
3611
|
+
* @enum {string}
|
|
3612
|
+
*/
|
|
3613
|
+
media?: "photo_first" | "monogram" | "none";
|
|
3614
|
+
/**
|
|
3615
|
+
* @description default `on`
|
|
3616
|
+
* @enum {string}
|
|
3617
|
+
*/
|
|
3618
|
+
prices?: "on" | "from_only" | "off";
|
|
3619
|
+
/** @description default true */
|
|
3620
|
+
ratings?: boolean;
|
|
3621
|
+
/** @description when supported; default true */
|
|
3622
|
+
distance?: boolean;
|
|
3623
|
+
/** @description default true */
|
|
3624
|
+
next_opening?: boolean;
|
|
3625
|
+
/** @description default false */
|
|
3626
|
+
compare?: boolean;
|
|
3627
|
+
/** @description through the host's map; default false */
|
|
3628
|
+
map?: boolean;
|
|
3629
|
+
/** @description default true */
|
|
3630
|
+
see_all?: boolean;
|
|
3631
|
+
/** @description per card kind, the actions drawn; absent kinds draw every eligible action */
|
|
3632
|
+
actions?: {
|
|
3633
|
+
[key: string]: ("open" | "book" | "message" | "save" | "compare")[];
|
|
3634
|
+
};
|
|
3635
|
+
/** @description the context changes a card's emphasis; default true */
|
|
3636
|
+
context_lead?: boolean;
|
|
3637
|
+
/** @description the "From your booking · checked just now" line; default true */
|
|
3638
|
+
sources?: boolean;
|
|
3639
|
+
};
|
|
3640
|
+
/** @description in-chat inputs (spec C) */
|
|
3641
|
+
inputs?: {
|
|
3642
|
+
/** @description absent: the flow's own set */
|
|
3643
|
+
enabled?: ("photo" | "address_map" | "hours" | "service_builder" | "trades" | "date_range" | "form")[];
|
|
3644
|
+
photo?: {
|
|
3645
|
+
/**
|
|
3646
|
+
* @description default `both`
|
|
3647
|
+
* @enum {string}
|
|
3648
|
+
*/
|
|
3649
|
+
sources?: "camera" | "library" | "both";
|
|
3650
|
+
/**
|
|
3651
|
+
* @description absent: per purpose
|
|
3652
|
+
* @enum {string}
|
|
3653
|
+
*/
|
|
3654
|
+
crop?: "square" | "circle" | "free" | "none";
|
|
3655
|
+
};
|
|
3656
|
+
address?: {
|
|
3657
|
+
/**
|
|
3658
|
+
* @description default `on`
|
|
3659
|
+
* @enum {string}
|
|
3660
|
+
*/
|
|
3661
|
+
map?: "on" | "text_only";
|
|
3662
|
+
};
|
|
3663
|
+
hours?: {
|
|
3664
|
+
/** @description default true */
|
|
3665
|
+
breaks?: boolean;
|
|
3666
|
+
};
|
|
3667
|
+
/**
|
|
3668
|
+
* @description default `always`
|
|
3669
|
+
* @enum {string}
|
|
3670
|
+
*/
|
|
3671
|
+
review?: "always" | "consequential_only";
|
|
3672
|
+
/** @description default true */
|
|
3673
|
+
natural_language_fill?: boolean;
|
|
3674
|
+
/** @description the customer-facing preview during setup; default true */
|
|
3675
|
+
preview?: boolean;
|
|
3676
|
+
};
|
|
3677
|
+
switcher?: {
|
|
3678
|
+
/** @description default true */
|
|
3679
|
+
enabled?: boolean;
|
|
3680
|
+
/**
|
|
3681
|
+
* @description default `active_mode`
|
|
3682
|
+
* @enum {string}
|
|
3683
|
+
*/
|
|
3684
|
+
scope?: "active_mode" | "all_modes";
|
|
3685
|
+
};
|
|
3686
|
+
continue_offer?: {
|
|
3687
|
+
/** @description default true */
|
|
3688
|
+
enabled?: boolean;
|
|
3689
|
+
/** @description Decided, Still needed, Changed since; default false */
|
|
3690
|
+
checkpoint?: boolean;
|
|
3691
|
+
};
|
|
3692
|
+
reopen?: {
|
|
3693
|
+
/**
|
|
3694
|
+
* @description default `where_left`
|
|
3695
|
+
* @enum {string}
|
|
3696
|
+
*/
|
|
3697
|
+
position?: "where_left" | "latest";
|
|
3698
|
+
};
|
|
3699
|
+
/** @description the switcher and history (spec D) */
|
|
3700
|
+
history?: {
|
|
3701
|
+
/** @description default true when the retention keeps transcripts */
|
|
3702
|
+
enabled?: boolean;
|
|
3703
|
+
/**
|
|
3704
|
+
* @description default `context`
|
|
3705
|
+
* @enum {string}
|
|
3706
|
+
*/
|
|
3707
|
+
group?: "context" | "day";
|
|
3708
|
+
/** @description default true */
|
|
3709
|
+
live_status?: boolean;
|
|
3710
|
+
/** @description default true */
|
|
3711
|
+
outcomes?: boolean;
|
|
3712
|
+
/** @description `ConversationSummary.last_message` drawn; default false */
|
|
3713
|
+
preview?: boolean;
|
|
3714
|
+
/** @description default true */
|
|
3715
|
+
filters?: boolean;
|
|
3716
|
+
/** @description default true */
|
|
3717
|
+
delete?: boolean;
|
|
3718
|
+
/** @description default true */
|
|
3719
|
+
archive?: boolean;
|
|
3720
|
+
/** @description default true */
|
|
3721
|
+
rename?: boolean;
|
|
3722
|
+
};
|
|
3723
|
+
drafts?: {
|
|
3724
|
+
/** @description default true */
|
|
3725
|
+
listed?: boolean;
|
|
3726
|
+
};
|
|
3727
|
+
delete?: {
|
|
3728
|
+
/** @description the kit holds a delete this long; default 10 */
|
|
3729
|
+
undo_seconds?: number;
|
|
3730
|
+
};
|
|
3731
|
+
/** @description accuracy feedback (spec F MA-01, MA-02) */
|
|
3732
|
+
feedback?: {
|
|
3733
|
+
/** @description helpful and not helpful; default true */
|
|
3734
|
+
accuracy?: boolean;
|
|
3735
|
+
/** @description the reasons offered after "not helpful", in order; empty: none. Default every one */
|
|
3736
|
+
reasons?: components["schemas"]["FeedbackReason"][];
|
|
3737
|
+
};
|
|
3738
|
+
/** @description Reactions (spec F MA-03). `like` is a single heart, recorded as `love`; `emoji` offers `set`, in order. With `like`, `set` is `[love]`. A reaction is never a rating, a preference or a consent. */
|
|
3739
|
+
reactions?: {
|
|
3740
|
+
/**
|
|
3741
|
+
* @description default `like`
|
|
3742
|
+
* @enum {string}
|
|
3743
|
+
*/
|
|
3744
|
+
mode?: "off" | "like" | "emoji";
|
|
3745
|
+
set?: components["schemas"]["ReactionKind"][];
|
|
3746
|
+
/** @description a double tap gives the first reaction of `set`; default true */
|
|
3747
|
+
double_tap?: boolean;
|
|
3748
|
+
};
|
|
3749
|
+
/** @description "How was this conversation?" once; default false */
|
|
3750
|
+
csat?: boolean;
|
|
3751
|
+
/** @description default true */
|
|
3752
|
+
copy?: boolean;
|
|
3753
|
+
share?: {
|
|
3754
|
+
/**
|
|
3755
|
+
* @description text with a preview sheet; default `preview`
|
|
3756
|
+
* @enum {string}
|
|
3757
|
+
*/
|
|
3758
|
+
mode?: "off" | "preview";
|
|
3759
|
+
/** @description persistent public links (not served yet, resolves false); default false */
|
|
3760
|
+
links?: boolean;
|
|
3761
|
+
};
|
|
3762
|
+
/** @description the phone's own speech; default true */
|
|
3763
|
+
read_aloud?: boolean;
|
|
3764
|
+
/**
|
|
3765
|
+
* @description Which of the person's messages may be edited (spec F MA-21): the latest (default), any after the most recent commitment, or none. Never across a commitment, whatever this says: the gateway refuses that.
|
|
3766
|
+
* @enum {string}
|
|
3767
|
+
*/
|
|
3768
|
+
edit?: "off" | "latest" | "after_commitment";
|
|
3769
|
+
/** @description Try again (spec F MA-30 to MA-32); only on replies that committed nothing, enforced by the gateway */
|
|
3770
|
+
regenerate?: {
|
|
3771
|
+
/**
|
|
3772
|
+
* @description default `newest`
|
|
3773
|
+
* @enum {string}
|
|
3774
|
+
*/
|
|
3775
|
+
scope?: "off" | "newest" | "any";
|
|
3776
|
+
/** @description versions per turn; default 5 */
|
|
3777
|
+
max?: number;
|
|
3778
|
+
};
|
|
3779
|
+
/**
|
|
3780
|
+
* @description default `on`
|
|
3781
|
+
* @enum {string}
|
|
3782
|
+
*/
|
|
3783
|
+
versions?: "off" | "on" | "on_with_sheet";
|
|
3784
|
+
/** @description forks (spec F MA-41 to MA-49) */
|
|
3785
|
+
fork?: {
|
|
3786
|
+
/** @description default false */
|
|
3787
|
+
enabled?: boolean;
|
|
3788
|
+
/**
|
|
3789
|
+
* @description default `nested`
|
|
3790
|
+
* @enum {string}
|
|
3791
|
+
*/
|
|
3792
|
+
style?: "nested" | "new_conversation";
|
|
3793
|
+
/** @description default true */
|
|
3794
|
+
compare?: boolean;
|
|
3795
|
+
/** @description default true */
|
|
3796
|
+
carry_back?: boolean;
|
|
3797
|
+
/** @description forks per conversation; default 5 */
|
|
3798
|
+
max?: number;
|
|
3799
|
+
};
|
|
3800
|
+
pins?: {
|
|
3801
|
+
/** @description default true */
|
|
3802
|
+
messages?: boolean;
|
|
3803
|
+
/** @description pinned messages per conversation; default 3 */
|
|
3804
|
+
max?: number;
|
|
3805
|
+
/** @description default true */
|
|
3806
|
+
conversations?: boolean;
|
|
3807
|
+
/**
|
|
3808
|
+
* @description `server` when the server serves pins
|
|
3809
|
+
* @enum {string}
|
|
3810
|
+
*/
|
|
3811
|
+
storage?: "server" | "device";
|
|
3812
|
+
};
|
|
3813
|
+
favorites?: {
|
|
3814
|
+
/** @description default false */
|
|
3815
|
+
messages?: boolean;
|
|
3816
|
+
/** @description default false */
|
|
3817
|
+
conversations?: boolean;
|
|
3818
|
+
};
|
|
3819
|
+
actions?: {
|
|
3820
|
+
/**
|
|
3821
|
+
* @description default `row_newest_plus_menu`
|
|
3822
|
+
* @enum {string}
|
|
3823
|
+
*/
|
|
3824
|
+
surface?: "row_newest_plus_menu" | "menu_only";
|
|
3825
|
+
};
|
|
3826
|
+
/** @description time in the transcript (spec I LC-01); day separators, exact times and times in labels stay in every mode */
|
|
3827
|
+
timestamps?: {
|
|
3828
|
+
/**
|
|
3829
|
+
* @description default `run`
|
|
3830
|
+
* @enum {string}
|
|
3831
|
+
*/
|
|
3832
|
+
mode?: "run" | "every" | "gap";
|
|
3833
|
+
/**
|
|
3834
|
+
* @description for gap labels; default 60
|
|
3835
|
+
* @enum {integer}
|
|
3836
|
+
*/
|
|
3837
|
+
gap_minutes?: 30 | 60 | 120;
|
|
3838
|
+
/** @description default true */
|
|
3839
|
+
floating_date?: boolean;
|
|
3840
|
+
};
|
|
3841
|
+
/** @description default true */
|
|
3842
|
+
day_separators?: boolean;
|
|
3843
|
+
/** @description the person's summary (spec I LC-10 to LC-12) */
|
|
3844
|
+
summary?: {
|
|
3845
|
+
/**
|
|
3846
|
+
* @description default `entry`
|
|
3847
|
+
* @enum {string}
|
|
3848
|
+
*/
|
|
3849
|
+
mode?: "off" | "entry" | "entry_with_preview";
|
|
3850
|
+
/** @description default true */
|
|
3851
|
+
outcome_chips?: boolean;
|
|
3852
|
+
/** @description the one-line summary on history rows; default false */
|
|
3853
|
+
show_in_history?: boolean;
|
|
3854
|
+
/** @description default true */
|
|
3855
|
+
editable?: boolean;
|
|
3856
|
+
};
|
|
3857
|
+
compaction?: {
|
|
3858
|
+
/** @description "Earlier messages summarized"; off hides the divider only, the transcript never changes; default true */
|
|
3859
|
+
divider?: boolean;
|
|
3860
|
+
};
|
|
3861
|
+
/** @description search (spec I LC-30); results are always the message's own text */
|
|
3862
|
+
search?: {
|
|
3863
|
+
/** @description empty: no search. Default both */
|
|
3864
|
+
scopes?: ("conversation" | "mode")[];
|
|
3865
|
+
/** @description meaning as well as words; false is words only; default true */
|
|
3866
|
+
semantic?: boolean;
|
|
3867
|
+
};
|
|
3868
|
+
chapters?: {
|
|
3869
|
+
/** @description default false */
|
|
3870
|
+
enabled?: boolean;
|
|
3871
|
+
/** @description default 80 */
|
|
3872
|
+
min_messages?: number;
|
|
3873
|
+
};
|
|
3874
|
+
/** @description default true */
|
|
3875
|
+
jump_to_latest?: boolean;
|
|
3876
|
+
unread?: {
|
|
3877
|
+
/** @description default true */
|
|
3878
|
+
divider?: boolean;
|
|
3879
|
+
};
|
|
3880
|
+
sources?: {
|
|
3881
|
+
/** @description under consequential claims; default true */
|
|
3882
|
+
line?: boolean;
|
|
3883
|
+
};
|
|
3884
|
+
/** @description memory in the chat (spec J); off whenever the person or the tenant turned memory off */
|
|
3885
|
+
memory?: {
|
|
3886
|
+
/** @description default true */
|
|
3887
|
+
chips?: boolean;
|
|
3888
|
+
/** @description "What the agent remembers"; default false */
|
|
3889
|
+
page?: boolean;
|
|
3890
|
+
/** @description a conversation kept out of memory; default true */
|
|
3891
|
+
per_conversation_off?: boolean;
|
|
3892
|
+
};
|
|
3893
|
+
handoff?: {
|
|
3894
|
+
/** @description absent in a setting: every route the tenant has when it is saved (stored as that list) */
|
|
3895
|
+
routes?: ("support" | "professional" | "host")[];
|
|
3896
|
+
/** @description a reviewable summary attached; default true */
|
|
3897
|
+
summary?: boolean;
|
|
3898
|
+
};
|
|
3899
|
+
/** @description default false */
|
|
3900
|
+
promises?: boolean;
|
|
3901
|
+
/** @description default false */
|
|
3902
|
+
ideas?: boolean;
|
|
3903
|
+
/** @description default false */
|
|
3904
|
+
goals?: boolean;
|
|
3905
|
+
};
|
|
3906
|
+
/** @description v1-draft.40, `getAgentExperience`: the agent's chat experience before any session, resolved as for `Session.experience` except the client's capabilities, which no session has given yet. */
|
|
3907
|
+
AgentExperience: {
|
|
3908
|
+
agent: string;
|
|
3909
|
+
experience_mode: components["schemas"]["ExperienceMode"];
|
|
3910
|
+
experience: components["schemas"]["ChatExperience"];
|
|
3911
|
+
/**
|
|
3912
|
+
* Format: date-time
|
|
3913
|
+
* @description when the tenant last changed it; absent while the agent runs on the defaults
|
|
3914
|
+
*/
|
|
3915
|
+
updated_at?: string;
|
|
3916
|
+
};
|
|
3917
|
+
/**
|
|
3918
|
+
* @description v1-draft.40, what a working step does, for its icon (spec A AS-10). Open for clients: an unknown kind is drawn as `other`.
|
|
3919
|
+
* @enum {string}
|
|
3920
|
+
*/
|
|
3921
|
+
StepKind: "search" | "availability" | "booking" | "rental" | "policy" | "price" | "setup" | "handoff" | "other";
|
|
3922
|
+
/**
|
|
3923
|
+
* @description v1-draft.40 (VIN-115, spec A AS-10 to AS-14): the working line of one tool call, on `tool.status`.
|
|
3924
|
+
*
|
|
3925
|
+
* **The words.** `text` is the step in the present tense ("Checking Riley's openings…"), and on `done` or
|
|
3926
|
+
* `failed` `text_done` is the past tense with its outcome ("Checked Riley's openings · 3 times on Saturday";
|
|
3927
|
+
* "Couldn't check Riley's openings right now"). Both come from the tenant's closed template for the tool (the
|
|
3928
|
+
* connector manifest's `tools[].step`, admin-v1), in the session's language, or from the platform's generic
|
|
3929
|
+
* step for the tool's capability when the tenant has none. The gateway fills them, so a client draws them as
|
|
3930
|
+
* they are and never formats a template.
|
|
3931
|
+
*
|
|
3932
|
+
* **Safe values only.** A template's placeholders are a closed list (`params`): each value comes from the
|
|
3933
|
+
* tool's validated arguments or its result (a resolved place's label, a resource's name the tool returned, a
|
|
3934
|
+
* service, a date), checked and cut to 60 code points, never from the model's text, a raw tool name or an
|
|
3935
|
+
* argument as the model wrote it. A value that is absent or fails its check leaves the template's generic form
|
|
3936
|
+
* ("Checking openings…"), never a guess.
|
|
3937
|
+
*
|
|
3938
|
+
* `template` and `params` are there for a client that localizes on its own; most draw `text`. `id` is the same
|
|
3939
|
+
* on the `running` and the final event of one call, so the step list replaces its row in place.
|
|
3940
|
+
*/
|
|
3941
|
+
ToolStep: {
|
|
3942
|
+
id: string;
|
|
3943
|
+
kind: components["schemas"]["StepKind"];
|
|
3944
|
+
text: string;
|
|
3945
|
+
/** @description on `done` and `failed` only */
|
|
3946
|
+
text_done?: string;
|
|
3947
|
+
/**
|
|
3948
|
+
* @description the template the words came from: `<tool>.running`, `<tool>.done`, or `platform.<kind>`
|
|
3949
|
+
* @example get_availability.running
|
|
3950
|
+
*/
|
|
3951
|
+
template?: string;
|
|
3952
|
+
params?: {
|
|
3953
|
+
area?: string;
|
|
3954
|
+
name?: string;
|
|
3955
|
+
service?: string;
|
|
3956
|
+
/** Format: date */
|
|
3957
|
+
date?: string;
|
|
3958
|
+
};
|
|
3959
|
+
/** Format: date-time */
|
|
3960
|
+
started_at: string;
|
|
3961
|
+
/** @description on `done` only */
|
|
3962
|
+
outcome?: {
|
|
3963
|
+
/** @description the items a read found, when it is a read */
|
|
3964
|
+
count?: number;
|
|
3965
|
+
/**
|
|
3966
|
+
* @description `recovered`: found after the gateway widened the search; `unchecked`: nothing to count
|
|
3967
|
+
* @enum {string}
|
|
3968
|
+
*/
|
|
3969
|
+
summary_key?: "found" | "none" | "recovered" | "unchecked";
|
|
3970
|
+
};
|
|
3971
|
+
};
|
|
3972
|
+
/**
|
|
3973
|
+
* @description An outcome citing a decision or a turn. Append-only: a record never changes, and a later one supersedes it.
|
|
3974
|
+
*
|
|
3975
|
+
* **A person's rating and reaction of a reply** (v1-draft.40, spec F MA-01 to MA-06), with `turn_id` and
|
|
3976
|
+
* `reviewer.role: end_user`:
|
|
3977
|
+
* - `thumbs_up` (helpful) and `thumbs_down` (not helpful); `thumbs_cleared` removes the rating;
|
|
3978
|
+
* - `reaction`, with `reaction` `love`, `thanks`, `haha` or `wow`, or `cleared` to remove the reaction;
|
|
3979
|
+
* - the latest record per turn and person wins, ratings and reactions apart, and a clear takes the turn out of
|
|
3980
|
+
* every count. The person is the turn's subject: the tenant's backend sends only what that person chose;
|
|
3981
|
+
* - a `thumbs_down` may carry `reason_codes` from the closed list `FeedbackReason`, and a `note` of at most 200
|
|
3982
|
+
* code points; an unknown reason code or a longer note rejects that record (`rejected[].code`
|
|
3983
|
+
* `invalid_request`);
|
|
3984
|
+
* - a `reaction` or a clear carries no `reason_codes` and no `note`; `reaction_set` records the tenant's mode and
|
|
3985
|
+
* set when the person reacted (a change of set is a measurement break);
|
|
3986
|
+
* - an agent's reply may be rated or reacted to, including a refused turn's line and a reply restored from
|
|
3987
|
+
* history, never the person's own message. A turn of another tenant or environment, or one with no reply, is
|
|
3988
|
+
* rejected (`not_found`), the same answer for each.
|
|
3989
|
+
*/
|
|
3990
|
+
FeedbackRecord: ({
|
|
2877
3991
|
decision_id?: string;
|
|
2878
3992
|
turn_id?: string;
|
|
2879
3993
|
/** @enum {string} */
|
|
2880
|
-
outcome: "approved" | "rejected" | "edited" | "escalated" | "user_appealed" | "appeal_upheld" | "appeal_denied" | "thumbs_up" | "thumbs_down";
|
|
3994
|
+
outcome: "approved" | "rejected" | "edited" | "escalated" | "user_appealed" | "appeal_upheld" | "appeal_denied" | "thumbs_up" | "thumbs_down" | "thumbs_cleared" | "reaction";
|
|
3995
|
+
/**
|
|
3996
|
+
* @description v1-draft.40, with `outcome` `reaction` only, and required with it
|
|
3997
|
+
* @enum {string}
|
|
3998
|
+
*/
|
|
3999
|
+
reaction?: "love" | "thanks" | "haha" | "wow" | "cleared";
|
|
4000
|
+
reaction_set?: components["schemas"]["ReactionSet"];
|
|
2881
4001
|
/** @enum {string} */
|
|
2882
4002
|
final_class?: "clean" | "review" | "hold" | "never";
|
|
2883
4003
|
reason_codes?: string[];
|
|
@@ -2888,8 +4008,31 @@ interface components {
|
|
|
2888
4008
|
};
|
|
2889
4009
|
/** Format: date-time */
|
|
2890
4010
|
decided_at: string;
|
|
4011
|
+
/** @description a reviewer's note; a person's, at most 200 (below) */
|
|
2891
4012
|
note?: string;
|
|
2892
|
-
} & (unknown | unknown);
|
|
4013
|
+
} & (unknown & unknown & unknown)) & (unknown | unknown);
|
|
4014
|
+
/**
|
|
4015
|
+
* @description v1-draft.40, why a reply was not helpful, from the person (spec F MA-02): "Not accurate", "Didn't answer my question", "Too long", "Something else…". A closed list: the tenant offers a subset of it.
|
|
4016
|
+
* @enum {string}
|
|
4017
|
+
*/
|
|
4018
|
+
FeedbackReason: "not_accurate" | "did_not_answer" | "too_long" | "other";
|
|
4019
|
+
/**
|
|
4020
|
+
* @description v1-draft.40, a reaction to a reply (spec F MA-03): love (a heart, also the single `like`), thanks, haha, wow. There is no thumbs-up reaction, so a reaction is never mistaken for a rating.
|
|
4021
|
+
* @enum {string}
|
|
4022
|
+
*/
|
|
4023
|
+
ReactionKind: "love" | "thanks" | "haha" | "wow";
|
|
4024
|
+
/** @description v1-draft.40, the tenant's reactions when the person reacted (`ChatExperience.reactions`) */
|
|
4025
|
+
ReactionSet: {
|
|
4026
|
+
/** @enum {string} */
|
|
4027
|
+
mode: "like" | "emoji";
|
|
4028
|
+
set: components["schemas"]["ReactionKind"][];
|
|
4029
|
+
};
|
|
4030
|
+
/** @description v1-draft.40, the person's current rating and reaction of an agent message: the latest feedback record of each, absent when there is none or it was cleared. */
|
|
4031
|
+
MessageFeedback: {
|
|
4032
|
+
/** @enum {string} */
|
|
4033
|
+
rating?: "helpful" | "not_helpful";
|
|
4034
|
+
reaction?: components["schemas"]["ReactionKind"];
|
|
4035
|
+
};
|
|
2893
4036
|
FeedbackBatch: {
|
|
2894
4037
|
records: components["schemas"]["FeedbackRecord"][];
|
|
2895
4038
|
};
|
|
@@ -2972,7 +4115,9 @@ interface components {
|
|
|
2972
4115
|
flags?: components["schemas"]["DocumentFlag"][];
|
|
2973
4116
|
decision?: components["schemas"]["Decision"];
|
|
2974
4117
|
model?: {
|
|
2975
|
-
id?:
|
|
4118
|
+
id?: components["schemas"]["ModelName"];
|
|
4119
|
+
/** @description what a person reads for `id` (v1-draft.35) */
|
|
4120
|
+
label?: string;
|
|
2976
4121
|
provider?: string;
|
|
2977
4122
|
};
|
|
2978
4123
|
error?: components["schemas"]["Problem"];
|
|
@@ -3024,6 +4169,7 @@ interface components {
|
|
|
3024
4169
|
BindingExperienceMode: components["schemas"]["ExperienceMode"];
|
|
3025
4170
|
/** @description v1-draft.24, optional: the business the caller acts for; when given, the conversation must be bound to it, else `404`. With `experience_mode: business` and no `business_scope_id`, a conversation bound to a business does not match. */
|
|
3026
4171
|
BindingBusinessScope: components["schemas"]["BusinessScopeId"];
|
|
4172
|
+
SubjectIdPath: components["schemas"]["SubjectId"];
|
|
3027
4173
|
IdempotencyKey: string;
|
|
3028
4174
|
/** @description Accepted, not required (declared in v1-draft.22). Scoped to the tenant and environment: the same key and request within 24 hours answers the first success again (`Idempotent-Replayed: true`); the same key with another request is `409 idempotency_conflict`. */
|
|
3029
4175
|
OptionalIdempotencyKey: string;
|
|
@@ -3216,7 +4362,7 @@ interface operations {
|
|
|
3216
4362
|
};
|
|
3217
4363
|
requestBody?: never;
|
|
3218
4364
|
responses: {
|
|
3219
|
-
/** @description The newest page first; oldest first within a page. */
|
|
4365
|
+
/** @description The newest page first; oldest first within a page. From v1-draft.28 every page also carries `conversation`, the conversation's summary as the list gives it. */
|
|
3220
4366
|
200: {
|
|
3221
4367
|
headers: {
|
|
3222
4368
|
[name: string]: unknown;
|
|
@@ -3803,6 +4949,121 @@ interface operations {
|
|
|
3803
4949
|
};
|
|
3804
4950
|
};
|
|
3805
4951
|
};
|
|
4952
|
+
getSubjectMemory: {
|
|
4953
|
+
parameters: {
|
|
4954
|
+
query?: {
|
|
4955
|
+
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
4956
|
+
/** @description the business the person acts for; only with `experience_mode=business` */
|
|
4957
|
+
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
4958
|
+
};
|
|
4959
|
+
header?: never;
|
|
4960
|
+
path: {
|
|
4961
|
+
subject_id: components["parameters"]["SubjectIdPath"];
|
|
4962
|
+
};
|
|
4963
|
+
cookie?: never;
|
|
4964
|
+
};
|
|
4965
|
+
requestBody?: never;
|
|
4966
|
+
responses: {
|
|
4967
|
+
/** @description OK */
|
|
4968
|
+
200: {
|
|
4969
|
+
headers: {
|
|
4970
|
+
[name: string]: unknown;
|
|
4971
|
+
};
|
|
4972
|
+
content: {
|
|
4973
|
+
"application/json": components["schemas"]["SubjectMemory"];
|
|
4974
|
+
};
|
|
4975
|
+
};
|
|
4976
|
+
400: components["responses"]["Problem"];
|
|
4977
|
+
401: components["responses"]["Problem"];
|
|
4978
|
+
403: components["responses"]["Problem"];
|
|
4979
|
+
503: components["responses"]["Problem"];
|
|
4980
|
+
};
|
|
4981
|
+
};
|
|
4982
|
+
putSubjectMemory: {
|
|
4983
|
+
parameters: {
|
|
4984
|
+
query?: never;
|
|
4985
|
+
header?: never;
|
|
4986
|
+
path: {
|
|
4987
|
+
subject_id: components["parameters"]["SubjectIdPath"];
|
|
4988
|
+
};
|
|
4989
|
+
cookie?: never;
|
|
4990
|
+
};
|
|
4991
|
+
requestBody: {
|
|
4992
|
+
content: {
|
|
4993
|
+
"application/json": components["schemas"]["SubjectMemoryChoice"];
|
|
4994
|
+
};
|
|
4995
|
+
};
|
|
4996
|
+
responses: {
|
|
4997
|
+
/** @description The choice as stored. */
|
|
4998
|
+
200: {
|
|
4999
|
+
headers: {
|
|
5000
|
+
[name: string]: unknown;
|
|
5001
|
+
};
|
|
5002
|
+
content: {
|
|
5003
|
+
"application/json": components["schemas"]["SubjectMemoryChoice"];
|
|
5004
|
+
};
|
|
5005
|
+
};
|
|
5006
|
+
400: components["responses"]["Problem"];
|
|
5007
|
+
401: components["responses"]["Problem"];
|
|
5008
|
+
403: components["responses"]["Problem"];
|
|
5009
|
+
503: components["responses"]["Problem"];
|
|
5010
|
+
};
|
|
5011
|
+
};
|
|
5012
|
+
acknowledgeMemoryNotice: {
|
|
5013
|
+
parameters: {
|
|
5014
|
+
query?: never;
|
|
5015
|
+
header?: never;
|
|
5016
|
+
path: {
|
|
5017
|
+
subject_id: components["parameters"]["SubjectIdPath"];
|
|
5018
|
+
};
|
|
5019
|
+
cookie?: never;
|
|
5020
|
+
};
|
|
5021
|
+
requestBody: {
|
|
5022
|
+
content: {
|
|
5023
|
+
"application/json": {
|
|
5024
|
+
version: components["schemas"]["MemoryNoticeVersion"];
|
|
5025
|
+
};
|
|
5026
|
+
};
|
|
5027
|
+
};
|
|
5028
|
+
responses: {
|
|
5029
|
+
/** @description Recorded. */
|
|
5030
|
+
204: {
|
|
5031
|
+
headers: {
|
|
5032
|
+
[name: string]: unknown;
|
|
5033
|
+
};
|
|
5034
|
+
content?: never;
|
|
5035
|
+
};
|
|
5036
|
+
400: components["responses"]["Problem"];
|
|
5037
|
+
401: components["responses"]["Problem"];
|
|
5038
|
+
403: components["responses"]["Problem"];
|
|
5039
|
+
503: components["responses"]["Problem"];
|
|
5040
|
+
};
|
|
5041
|
+
};
|
|
5042
|
+
deleteMemoryPreference: {
|
|
5043
|
+
parameters: {
|
|
5044
|
+
query?: never;
|
|
5045
|
+
header?: never;
|
|
5046
|
+
path: {
|
|
5047
|
+
subject_id: components["parameters"]["SubjectIdPath"];
|
|
5048
|
+
preference_id: string;
|
|
5049
|
+
};
|
|
5050
|
+
cookie?: never;
|
|
5051
|
+
};
|
|
5052
|
+
requestBody?: never;
|
|
5053
|
+
responses: {
|
|
5054
|
+
/** @description Forgotten. */
|
|
5055
|
+
204: {
|
|
5056
|
+
headers: {
|
|
5057
|
+
[name: string]: unknown;
|
|
5058
|
+
};
|
|
5059
|
+
content?: never;
|
|
5060
|
+
};
|
|
5061
|
+
401: components["responses"]["Problem"];
|
|
5062
|
+
403: components["responses"]["Problem"];
|
|
5063
|
+
404: components["responses"]["Problem"];
|
|
5064
|
+
503: components["responses"]["Problem"];
|
|
5065
|
+
};
|
|
5066
|
+
};
|
|
3806
5067
|
sendEvents: {
|
|
3807
5068
|
parameters: {
|
|
3808
5069
|
query?: never;
|
|
@@ -3933,6 +5194,59 @@ interface operations {
|
|
|
3933
5194
|
403: components["responses"]["Problem"];
|
|
3934
5195
|
};
|
|
3935
5196
|
};
|
|
5197
|
+
getAgentExperience: {
|
|
5198
|
+
parameters: {
|
|
5199
|
+
query?: {
|
|
5200
|
+
/** @description the side of the app; left out, the agent's template's */
|
|
5201
|
+
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
5202
|
+
};
|
|
5203
|
+
header?: never;
|
|
5204
|
+
path: {
|
|
5205
|
+
agent: string;
|
|
5206
|
+
};
|
|
5207
|
+
cookie?: never;
|
|
5208
|
+
};
|
|
5209
|
+
requestBody?: never;
|
|
5210
|
+
responses: {
|
|
5211
|
+
/** @description OK */
|
|
5212
|
+
200: {
|
|
5213
|
+
headers: {
|
|
5214
|
+
/** @description `private, max-age=60` */
|
|
5215
|
+
"Cache-Control"?: string;
|
|
5216
|
+
[name: string]: unknown;
|
|
5217
|
+
};
|
|
5218
|
+
content: {
|
|
5219
|
+
"application/json": components["schemas"]["AgentExperience"];
|
|
5220
|
+
};
|
|
5221
|
+
};
|
|
5222
|
+
401: components["responses"]["Problem"];
|
|
5223
|
+
403: components["responses"]["Problem"];
|
|
5224
|
+
404: components["responses"]["Problem"];
|
|
5225
|
+
503: components["responses"]["Problem"];
|
|
5226
|
+
};
|
|
5227
|
+
};
|
|
5228
|
+
getMeta: {
|
|
5229
|
+
parameters: {
|
|
5230
|
+
query?: never;
|
|
5231
|
+
header?: never;
|
|
5232
|
+
path?: never;
|
|
5233
|
+
cookie?: never;
|
|
5234
|
+
};
|
|
5235
|
+
requestBody?: never;
|
|
5236
|
+
responses: {
|
|
5237
|
+
/** @description OK */
|
|
5238
|
+
200: {
|
|
5239
|
+
headers: {
|
|
5240
|
+
/** @description `public, max-age=60` */
|
|
5241
|
+
"Cache-Control"?: string;
|
|
5242
|
+
[name: string]: unknown;
|
|
5243
|
+
};
|
|
5244
|
+
content: {
|
|
5245
|
+
"application/json": components["schemas"]["Meta"];
|
|
5246
|
+
};
|
|
5247
|
+
};
|
|
5248
|
+
};
|
|
5249
|
+
};
|
|
3936
5250
|
getUsage: {
|
|
3937
5251
|
parameters: {
|
|
3938
5252
|
query?: {
|