@vinaverse/server 0.1.0-alpha.10 → 0.1.0-alpha.11

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.
@@ -130,7 +130,7 @@ interface paths {
130
130
  * - Fences late writes: a turn still running, a webhook retry or a worker job that finishes after the delete
131
131
  * records nothing for it (a deletion barrier, kept as long as the longest session could run).
132
132
  * - Frees its `conversation_key`: a session with the same key afterwards starts a new conversation.
133
- * **Answers.** `200` with the number of sessions revoked. An unknown id, another tenant's, environment's or subject's, or one already deleted or erased: `404 not_found`, the same answer for each, so it never says whether the conversation exists. Deleting is not erasing the subject (`eraseSubject`): the person's other conversations and memory stay.
133
+ * **Answers.** `200` with the number of sessions revoked. An unknown id, another tenant's, environment's or subject's, one bound to another `agent`, side or business than the call names (v1-draft.24), or one already deleted or erased: `404 not_found`, the same answer for each, so it never says whether the conversation exists. Deleting is not erasing the subject (`eraseSubject`): the person's other conversations and memory stay.
134
134
  */
135
135
  delete: operations["deleteConversation"];
136
136
  options?: never;
@@ -150,7 +150,7 @@ interface paths {
150
150
  * @description v1-draft.21 (VIN-246): what a history screen draws when the person opens a past conversation. A service key with `conversations:read`, for its own tenant and environment; `subject_id` must be the conversation's subject.
151
151
  * **The timeline.** One list of messages and the cards their turns drew, in the order they happened, each with an `id` that is stable and unique within the conversation. The first page is the newest; within a page, oldest first; `next_cursor` pages toward older items. A message carries `event_id`, the identifier its live event gave it (as `TranscriptItem.id`: an `assistant` message's `turn_id`, a `person` message's `client_event_id`, a `staff` message's `message_id`), so an app merges what it drew live, or a resumed `session.ready.transcript`, into the fetched history by `role` and `event_id` instead of replacing either. An input the runtime never recorded is not in it, as in the transcript.
152
152
  * **Cards from history are read-only.** An app draws their actions disabled: a past slot, price or availability is not checked again, so a tap would act on stale data. The person asks again in the conversation, and a fresh turn draws fresh cards.
153
- * **What is kept.** Only what the tenant's `transcript_retention` still keeps; a conversation past it is `410 conversation_expired`. An unknown id, another tenant's, environment's or subject's, or a deleted or erased one: `404 not_found`, the same answer for each. A cursor changed, used for another conversation or expired (24 hours) is `400 invalid_request` at `/cursor`. An outage is `503 unavailable`, never an empty timeline.
153
+ * **What is kept.** Only what the tenant's `transcript_retention` still keeps; a conversation past it is `410 conversation_expired`. An unknown id, another tenant's, environment's or subject's, or a deleted or erased one, or one bound to another `agent`, side or business than the call names (v1-draft.24): `404 not_found`, the same answer for each. A cursor changed, used for another conversation or expired (24 hours) is `400 invalid_request` at `/cursor`. An outage is `503 unavailable`, never an empty timeline.
154
154
  */
155
155
  get: operations["listConversationMessages"];
156
156
  put?: never;
@@ -177,6 +177,28 @@ interface paths {
177
177
  patch?: never;
178
178
  trace?: never;
179
179
  };
180
+ "/v1/sessions/{session_id}/context": {
181
+ parameters: {
182
+ query?: never;
183
+ header?: never;
184
+ path?: never;
185
+ cookie?: never;
186
+ };
187
+ get?: never;
188
+ /**
189
+ * Tell an open session where the person is now
190
+ * @description v1-draft.23 (VIN-115): the person moved to another screen while the chat is open; the tenant's backend, which checked that they may see what is on it, says so, and the session keeps going (no new session per navigation). A service key with `sessions:write`, for the session's own tenant and environment: another tenant's or an unknown session is `404 not_found`, an ended one `409 session_closed`.
191
+ * **The body** is a `ScreenContext` (the same type and rules as on `createSession`: a fixed vocabulary, typed filters, never page text, and it grants nothing), or `{clear: true, revision}` when the person left any screen that says something (the agent then has no screen context). Either way `revision` must be greater than the session's: the tenant's own counter for this person's screen, so a late update never overwrites a newer one. An older or equal revision is `409 context_stale` with `current_revision`, except the same revision with the same body, which is a retry and answered `200` as the first time.
192
+ * **What follows.** The session's open socket gets `context.updated` (the revision, and `cleared: true` after a clear). A turn already running keeps the context it started with; the next turn reads the new one, as data in the turn's details, never in the cached prompt.
193
+ */
194
+ put: operations["updateSessionContext"];
195
+ post?: never;
196
+ delete?: never;
197
+ options?: never;
198
+ head?: never;
199
+ patch?: never;
200
+ trace?: never;
201
+ };
180
202
  "/v1/sessions/{session_id}/revoke": {
181
203
  parameters: {
182
204
  query?: never;
@@ -1273,10 +1295,12 @@ interface components {
1273
1295
  title: string;
1274
1296
  status: number;
1275
1297
  /** @enum {string} */
1276
- code: "invalid_request" | "unauthenticated" | "forbidden" | "feature_unavailable" | "not_found" | "idempotency_conflict" | "session_closed" | "payload_too_large" | "unprocessable_media" | "rate_limited" | "internal" | "unavailable" | "conversation_mismatch" | "conversation_expired" | "conversation_completed";
1298
+ code: "invalid_request" | "unauthenticated" | "forbidden" | "feature_unavailable" | "not_found" | "idempotency_conflict" | "session_closed" | "payload_too_large" | "unprocessable_media" | "rate_limited" | "internal" | "unavailable" | "conversation_mismatch" | "conversation_expired" | "conversation_completed" | "context_stale";
1277
1299
  detail?: string;
1278
1300
  request_id: string;
1279
1301
  retryable: boolean;
1302
+ /** @description v1-draft.23, with `context_stale` only, the session's screen-context revision now */
1303
+ current_revision?: number;
1280
1304
  /** @description field-level problems for invalid_request */
1281
1305
  errors?: {
1282
1306
  /** @description JSON Pointer into the request */
@@ -1450,7 +1474,7 @@ interface components {
1450
1474
  ExperienceMode: "customer" | "business";
1451
1475
  /** @description v1-draft.20, optional, with `experience_mode: business` only: the business the person acts for, as the tenant's backend knows it (a professional's business, a host's place). Opaque to Vinaverse; it binds the conversation, so a person acting for two businesses keeps two conversations. It never reaches a model prompt. */
1452
1476
  BusinessScopeId: string;
1453
- /** @description v1-draft.20, optional on `createSession`: where the person is in the tenant's app when the session opens, as the tenant's backend vouches for it (it checked that the person may see the entity). It grants nothing: no tool, capability or record. The agent reads it as data in its working notes (never in the cached system prompt, never as something the person said), as a hint: before it states anything about the entity it reads it with a tool, and a tool that refuses means the agent says it cannot see it. A screen change while the chat is open does not open a new session; live updates are a later addition. Never arbitrary page text, URLs, names, amounts or instructions: only these fields, from this vocabulary. */
1477
+ /** @description v1-draft.20, optional on `createSession`: where the person is in the tenant's app when the session opens, as the tenant's backend vouches for it (it checked that the person may see the entity). It grants nothing: no tool, capability or record. The agent reads it as data in its working notes (never in the cached system prompt, never as something the person said), as a hint: before it states anything about the entity it reads it with a tool, and a tool that refuses means the agent says it cannot see it. A screen change while the chat is open does not open a new session: the tenant's backend sends it with `updateSessionContext` (v1-draft.23). Never arbitrary page text, URLs, names, amounts or instructions: only these fields, from this vocabulary. */
1454
1478
  ScreenContext: {
1455
1479
  /**
1456
1480
  * @description A coarse screen from a fixed vocabulary; the tenant maps its own screens onto it. `other` when none fits. Customer side: `home`, `explore`, `search_results`, `professional`, `workspace`, `service`, `class`, `checkout`, `booking`, `bookings`, `inbox`, `profile`. Business side: `business_hub`, `setup`, `services`, `hours`, `location`, `gallery`, `spaces`, `space_manage`, `renters`, `payouts`, `plans`, `team`.
@@ -1474,8 +1498,19 @@ interface components {
1474
1498
  date_to?: string;
1475
1499
  price_max?: components["schemas"]["Money"];
1476
1500
  };
1477
- /** @description the tenant's counter for this person's screen state; a later update never goes back to a lower one */
1501
+ /** @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
+ revision: number;
1503
+ };
1504
+ /** @description v1-draft.23: what `updateSessionContext` takes: the person's screen now (`ScreenContext`), or an explicit clear. Both carry the tenant's `revision`, which must be greater than the session's. */
1505
+ SessionContextUpdate: components["schemas"]["ScreenContext"] | {
1506
+ /** @constant */
1507
+ clear: true;
1508
+ revision: number;
1509
+ };
1510
+ /** @description v1-draft.23, the session's screen context after an update; no `screen_context` after a clear */
1511
+ SessionContextState: {
1478
1512
  revision: number;
1513
+ screen_context?: components["schemas"]["ScreenContext"];
1479
1514
  };
1480
1515
  /** @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. */
1481
1516
  Chip: {
@@ -2385,6 +2420,15 @@ interface components {
2385
2420
  */
2386
2421
  code: "screened" | "too_long" | "turn_in_progress" | "limit_reached" | "duplicate" | "guardrail" | "screen_unavailable";
2387
2422
  message: string;
2423
+ } | {
2424
+ /** @constant */
2425
+ type: "context.updated";
2426
+ revision: number;
2427
+ /**
2428
+ * @description present only after an explicit clear
2429
+ * @constant
2430
+ */
2431
+ cleared?: true;
2388
2432
  } | {
2389
2433
  /** @constant */
2390
2434
  type: "session.expiring";
@@ -2974,6 +3018,12 @@ interface components {
2974
3018
  };
2975
3019
  };
2976
3020
  parameters: {
3021
+ /** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
3022
+ BindingAgent: string;
3023
+ /** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
3024
+ BindingExperienceMode: components["schemas"]["ExperienceMode"];
3025
+ /** @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
+ BindingBusinessScope: components["schemas"]["BusinessScopeId"];
2977
3027
  IdempotencyKey: string;
2978
3028
  /** @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`. */
2979
3029
  OptionalIdempotencyKey: string;
@@ -3115,6 +3165,12 @@ interface operations {
3115
3165
  parameters: {
3116
3166
  query: {
3117
3167
  subject_id: components["schemas"]["SubjectId"];
3168
+ /** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
3169
+ agent?: components["parameters"]["BindingAgent"];
3170
+ /** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
3171
+ experience_mode?: components["parameters"]["BindingExperienceMode"];
3172
+ /** @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. */
3173
+ business_scope_id?: components["parameters"]["BindingBusinessScope"];
3118
3174
  };
3119
3175
  header?: never;
3120
3176
  path: {
@@ -3143,6 +3199,12 @@ interface operations {
3143
3199
  parameters: {
3144
3200
  query: {
3145
3201
  subject_id: components["schemas"]["SubjectId"];
3202
+ /** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
3203
+ agent?: components["parameters"]["BindingAgent"];
3204
+ /** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
3205
+ experience_mode?: components["parameters"]["BindingExperienceMode"];
3206
+ /** @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. */
3207
+ business_scope_id?: components["parameters"]["BindingBusinessScope"];
3146
3208
  limit?: number;
3147
3209
  cursor?: string;
3148
3210
  };
@@ -3194,6 +3256,37 @@ interface operations {
3194
3256
  404: components["responses"]["Problem"];
3195
3257
  };
3196
3258
  };
3259
+ updateSessionContext: {
3260
+ parameters: {
3261
+ query?: never;
3262
+ header?: never;
3263
+ path: {
3264
+ session_id: components["parameters"]["SessionId"];
3265
+ };
3266
+ cookie?: never;
3267
+ };
3268
+ requestBody: {
3269
+ content: {
3270
+ "application/json": components["schemas"]["SessionContextUpdate"];
3271
+ };
3272
+ };
3273
+ responses: {
3274
+ /** @description The session's screen context now. */
3275
+ 200: {
3276
+ headers: {
3277
+ [name: string]: unknown;
3278
+ };
3279
+ content: {
3280
+ "application/json": components["schemas"]["SessionContextState"];
3281
+ };
3282
+ };
3283
+ 400: components["responses"]["Problem"];
3284
+ 401: components["responses"]["Problem"];
3285
+ 403: components["responses"]["Problem"];
3286
+ 404: components["responses"]["Problem"];
3287
+ 409: components["responses"]["Problem"];
3288
+ };
3289
+ };
3197
3290
  revokeSession: {
3198
3291
  parameters: {
3199
3292
  query?: never;
@@ -130,7 +130,7 @@ interface paths {
130
130
  * - Fences late writes: a turn still running, a webhook retry or a worker job that finishes after the delete
131
131
  * records nothing for it (a deletion barrier, kept as long as the longest session could run).
132
132
  * - Frees its `conversation_key`: a session with the same key afterwards starts a new conversation.
133
- * **Answers.** `200` with the number of sessions revoked. An unknown id, another tenant's, environment's or subject's, or one already deleted or erased: `404 not_found`, the same answer for each, so it never says whether the conversation exists. Deleting is not erasing the subject (`eraseSubject`): the person's other conversations and memory stay.
133
+ * **Answers.** `200` with the number of sessions revoked. An unknown id, another tenant's, environment's or subject's, one bound to another `agent`, side or business than the call names (v1-draft.24), or one already deleted or erased: `404 not_found`, the same answer for each, so it never says whether the conversation exists. Deleting is not erasing the subject (`eraseSubject`): the person's other conversations and memory stay.
134
134
  */
135
135
  delete: operations["deleteConversation"];
136
136
  options?: never;
@@ -150,7 +150,7 @@ interface paths {
150
150
  * @description v1-draft.21 (VIN-246): what a history screen draws when the person opens a past conversation. A service key with `conversations:read`, for its own tenant and environment; `subject_id` must be the conversation's subject.
151
151
  * **The timeline.** One list of messages and the cards their turns drew, in the order they happened, each with an `id` that is stable and unique within the conversation. The first page is the newest; within a page, oldest first; `next_cursor` pages toward older items. A message carries `event_id`, the identifier its live event gave it (as `TranscriptItem.id`: an `assistant` message's `turn_id`, a `person` message's `client_event_id`, a `staff` message's `message_id`), so an app merges what it drew live, or a resumed `session.ready.transcript`, into the fetched history by `role` and `event_id` instead of replacing either. An input the runtime never recorded is not in it, as in the transcript.
152
152
  * **Cards from history are read-only.** An app draws their actions disabled: a past slot, price or availability is not checked again, so a tap would act on stale data. The person asks again in the conversation, and a fresh turn draws fresh cards.
153
- * **What is kept.** Only what the tenant's `transcript_retention` still keeps; a conversation past it is `410 conversation_expired`. An unknown id, another tenant's, environment's or subject's, or a deleted or erased one: `404 not_found`, the same answer for each. A cursor changed, used for another conversation or expired (24 hours) is `400 invalid_request` at `/cursor`. An outage is `503 unavailable`, never an empty timeline.
153
+ * **What is kept.** Only what the tenant's `transcript_retention` still keeps; a conversation past it is `410 conversation_expired`. An unknown id, another tenant's, environment's or subject's, or a deleted or erased one, or one bound to another `agent`, side or business than the call names (v1-draft.24): `404 not_found`, the same answer for each. A cursor changed, used for another conversation or expired (24 hours) is `400 invalid_request` at `/cursor`. An outage is `503 unavailable`, never an empty timeline.
154
154
  */
155
155
  get: operations["listConversationMessages"];
156
156
  put?: never;
@@ -177,6 +177,28 @@ interface paths {
177
177
  patch?: never;
178
178
  trace?: never;
179
179
  };
180
+ "/v1/sessions/{session_id}/context": {
181
+ parameters: {
182
+ query?: never;
183
+ header?: never;
184
+ path?: never;
185
+ cookie?: never;
186
+ };
187
+ get?: never;
188
+ /**
189
+ * Tell an open session where the person is now
190
+ * @description v1-draft.23 (VIN-115): the person moved to another screen while the chat is open; the tenant's backend, which checked that they may see what is on it, says so, and the session keeps going (no new session per navigation). A service key with `sessions:write`, for the session's own tenant and environment: another tenant's or an unknown session is `404 not_found`, an ended one `409 session_closed`.
191
+ * **The body** is a `ScreenContext` (the same type and rules as on `createSession`: a fixed vocabulary, typed filters, never page text, and it grants nothing), or `{clear: true, revision}` when the person left any screen that says something (the agent then has no screen context). Either way `revision` must be greater than the session's: the tenant's own counter for this person's screen, so a late update never overwrites a newer one. An older or equal revision is `409 context_stale` with `current_revision`, except the same revision with the same body, which is a retry and answered `200` as the first time.
192
+ * **What follows.** The session's open socket gets `context.updated` (the revision, and `cleared: true` after a clear). A turn already running keeps the context it started with; the next turn reads the new one, as data in the turn's details, never in the cached prompt.
193
+ */
194
+ put: operations["updateSessionContext"];
195
+ post?: never;
196
+ delete?: never;
197
+ options?: never;
198
+ head?: never;
199
+ patch?: never;
200
+ trace?: never;
201
+ };
180
202
  "/v1/sessions/{session_id}/revoke": {
181
203
  parameters: {
182
204
  query?: never;
@@ -1273,10 +1295,12 @@ interface components {
1273
1295
  title: string;
1274
1296
  status: number;
1275
1297
  /** @enum {string} */
1276
- code: "invalid_request" | "unauthenticated" | "forbidden" | "feature_unavailable" | "not_found" | "idempotency_conflict" | "session_closed" | "payload_too_large" | "unprocessable_media" | "rate_limited" | "internal" | "unavailable" | "conversation_mismatch" | "conversation_expired" | "conversation_completed";
1298
+ code: "invalid_request" | "unauthenticated" | "forbidden" | "feature_unavailable" | "not_found" | "idempotency_conflict" | "session_closed" | "payload_too_large" | "unprocessable_media" | "rate_limited" | "internal" | "unavailable" | "conversation_mismatch" | "conversation_expired" | "conversation_completed" | "context_stale";
1277
1299
  detail?: string;
1278
1300
  request_id: string;
1279
1301
  retryable: boolean;
1302
+ /** @description v1-draft.23, with `context_stale` only, the session's screen-context revision now */
1303
+ current_revision?: number;
1280
1304
  /** @description field-level problems for invalid_request */
1281
1305
  errors?: {
1282
1306
  /** @description JSON Pointer into the request */
@@ -1450,7 +1474,7 @@ interface components {
1450
1474
  ExperienceMode: "customer" | "business";
1451
1475
  /** @description v1-draft.20, optional, with `experience_mode: business` only: the business the person acts for, as the tenant's backend knows it (a professional's business, a host's place). Opaque to Vinaverse; it binds the conversation, so a person acting for two businesses keeps two conversations. It never reaches a model prompt. */
1452
1476
  BusinessScopeId: string;
1453
- /** @description v1-draft.20, optional on `createSession`: where the person is in the tenant's app when the session opens, as the tenant's backend vouches for it (it checked that the person may see the entity). It grants nothing: no tool, capability or record. The agent reads it as data in its working notes (never in the cached system prompt, never as something the person said), as a hint: before it states anything about the entity it reads it with a tool, and a tool that refuses means the agent says it cannot see it. A screen change while the chat is open does not open a new session; live updates are a later addition. Never arbitrary page text, URLs, names, amounts or instructions: only these fields, from this vocabulary. */
1477
+ /** @description v1-draft.20, optional on `createSession`: where the person is in the tenant's app when the session opens, as the tenant's backend vouches for it (it checked that the person may see the entity). It grants nothing: no tool, capability or record. The agent reads it as data in its working notes (never in the cached system prompt, never as something the person said), as a hint: before it states anything about the entity it reads it with a tool, and a tool that refuses means the agent says it cannot see it. A screen change while the chat is open does not open a new session: the tenant's backend sends it with `updateSessionContext` (v1-draft.23). Never arbitrary page text, URLs, names, amounts or instructions: only these fields, from this vocabulary. */
1454
1478
  ScreenContext: {
1455
1479
  /**
1456
1480
  * @description A coarse screen from a fixed vocabulary; the tenant maps its own screens onto it. `other` when none fits. Customer side: `home`, `explore`, `search_results`, `professional`, `workspace`, `service`, `class`, `checkout`, `booking`, `bookings`, `inbox`, `profile`. Business side: `business_hub`, `setup`, `services`, `hours`, `location`, `gallery`, `spaces`, `space_manage`, `renters`, `payouts`, `plans`, `team`.
@@ -1474,8 +1498,19 @@ interface components {
1474
1498
  date_to?: string;
1475
1499
  price_max?: components["schemas"]["Money"];
1476
1500
  };
1477
- /** @description the tenant's counter for this person's screen state; a later update never goes back to a lower one */
1501
+ /** @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
+ revision: number;
1503
+ };
1504
+ /** @description v1-draft.23: what `updateSessionContext` takes: the person's screen now (`ScreenContext`), or an explicit clear. Both carry the tenant's `revision`, which must be greater than the session's. */
1505
+ SessionContextUpdate: components["schemas"]["ScreenContext"] | {
1506
+ /** @constant */
1507
+ clear: true;
1508
+ revision: number;
1509
+ };
1510
+ /** @description v1-draft.23, the session's screen context after an update; no `screen_context` after a clear */
1511
+ SessionContextState: {
1478
1512
  revision: number;
1513
+ screen_context?: components["schemas"]["ScreenContext"];
1479
1514
  };
1480
1515
  /** @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. */
1481
1516
  Chip: {
@@ -2385,6 +2420,15 @@ interface components {
2385
2420
  */
2386
2421
  code: "screened" | "too_long" | "turn_in_progress" | "limit_reached" | "duplicate" | "guardrail" | "screen_unavailable";
2387
2422
  message: string;
2423
+ } | {
2424
+ /** @constant */
2425
+ type: "context.updated";
2426
+ revision: number;
2427
+ /**
2428
+ * @description present only after an explicit clear
2429
+ * @constant
2430
+ */
2431
+ cleared?: true;
2388
2432
  } | {
2389
2433
  /** @constant */
2390
2434
  type: "session.expiring";
@@ -2974,6 +3018,12 @@ interface components {
2974
3018
  };
2975
3019
  };
2976
3020
  parameters: {
3021
+ /** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
3022
+ BindingAgent: string;
3023
+ /** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
3024
+ BindingExperienceMode: components["schemas"]["ExperienceMode"];
3025
+ /** @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
+ BindingBusinessScope: components["schemas"]["BusinessScopeId"];
2977
3027
  IdempotencyKey: string;
2978
3028
  /** @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`. */
2979
3029
  OptionalIdempotencyKey: string;
@@ -3115,6 +3165,12 @@ interface operations {
3115
3165
  parameters: {
3116
3166
  query: {
3117
3167
  subject_id: components["schemas"]["SubjectId"];
3168
+ /** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
3169
+ agent?: components["parameters"]["BindingAgent"];
3170
+ /** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
3171
+ experience_mode?: components["parameters"]["BindingExperienceMode"];
3172
+ /** @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. */
3173
+ business_scope_id?: components["parameters"]["BindingBusinessScope"];
3118
3174
  };
3119
3175
  header?: never;
3120
3176
  path: {
@@ -3143,6 +3199,12 @@ interface operations {
3143
3199
  parameters: {
3144
3200
  query: {
3145
3201
  subject_id: components["schemas"]["SubjectId"];
3202
+ /** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
3203
+ agent?: components["parameters"]["BindingAgent"];
3204
+ /** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
3205
+ experience_mode?: components["parameters"]["BindingExperienceMode"];
3206
+ /** @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. */
3207
+ business_scope_id?: components["parameters"]["BindingBusinessScope"];
3146
3208
  limit?: number;
3147
3209
  cursor?: string;
3148
3210
  };
@@ -3194,6 +3256,37 @@ interface operations {
3194
3256
  404: components["responses"]["Problem"];
3195
3257
  };
3196
3258
  };
3259
+ updateSessionContext: {
3260
+ parameters: {
3261
+ query?: never;
3262
+ header?: never;
3263
+ path: {
3264
+ session_id: components["parameters"]["SessionId"];
3265
+ };
3266
+ cookie?: never;
3267
+ };
3268
+ requestBody: {
3269
+ content: {
3270
+ "application/json": components["schemas"]["SessionContextUpdate"];
3271
+ };
3272
+ };
3273
+ responses: {
3274
+ /** @description The session's screen context now. */
3275
+ 200: {
3276
+ headers: {
3277
+ [name: string]: unknown;
3278
+ };
3279
+ content: {
3280
+ "application/json": components["schemas"]["SessionContextState"];
3281
+ };
3282
+ };
3283
+ 400: components["responses"]["Problem"];
3284
+ 401: components["responses"]["Problem"];
3285
+ 403: components["responses"]["Problem"];
3286
+ 404: components["responses"]["Problem"];
3287
+ 409: components["responses"]["Problem"];
3288
+ };
3289
+ };
3197
3290
  revokeSession: {
3198
3291
  parameters: {
3199
3292
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vinaverse/server",
3
- "version": "0.1.0-alpha.10",
3
+ "version": "0.1.0-alpha.11",
4
4
  "description": "Vinaverse for Node backends: verify webhooks into typed contract events, with adapters for AWS Lambda, Express, Fastify and Hono, serve tools, and call the Vinaverse API typed.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Vinaverse, Inc.",