@spotto/contract 1.0.70-alpha.25 → 1.0.70-alpha.26
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.
|
@@ -7,9 +7,24 @@ import { SemanticQueryEntityType } from '../../semantic-queries';
|
|
|
7
7
|
* the intent is known). Only a supported intent goes on to pay for the big
|
|
8
8
|
* model; everything else is answered honestly as recognised-but-not-built.
|
|
9
9
|
*/
|
|
10
|
+
/** One prior turn of the on-screen transcript, replayed as context. */
|
|
11
|
+
export interface AiChatHistoryTurn {
|
|
12
|
+
role: 'user' | 'assistant';
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
10
15
|
export interface PostAiChatRequest {
|
|
11
16
|
/** The user's chat message, verbatim. */
|
|
12
17
|
message: string;
|
|
18
|
+
/**
|
|
19
|
+
* Recent turns of the conversation, oldest first — the client holds the
|
|
20
|
+
* transcript, the server stores none of it.
|
|
21
|
+
*
|
|
22
|
+
* Read by PRODUCT HELP only, where a follow-up ("and how do I undo that?")
|
|
23
|
+
* is meaningless without what came before. Query turns need no transcript:
|
|
24
|
+
* the registered query IS the state and `baseQueryId` carries it, which is
|
|
25
|
+
* why chat conversations are not persisted at all.
|
|
26
|
+
*/
|
|
27
|
+
history?: AiChatHistoryTurn[];
|
|
13
28
|
/**
|
|
14
29
|
* Id of the stored query the user currently has open, if any. Context for
|
|
15
30
|
* the classifier (an instruction fragment refines the open query) and the
|
|
@@ -47,11 +47,28 @@ export interface AiChatQueryResponse extends AiChatResponseBase {
|
|
|
47
47
|
/** The generation outcome, identical to POST /ai/semantic-query. */
|
|
48
48
|
result: PostAiSemanticQueryResponse;
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* A help article an answer drew on — enough to render a link, no more.
|
|
52
|
+
*
|
|
53
|
+
* Matched by TITLE against the reply the model produced, which is why an
|
|
54
|
+
* answer is asked to name its article: a miss costs a link, not an answer.
|
|
55
|
+
*/
|
|
56
|
+
export interface AiHelpSource {
|
|
57
|
+
title: string;
|
|
58
|
+
url: string;
|
|
59
|
+
}
|
|
50
60
|
/** A text-only turn: product help, general chat, or recognised-but-not-built. */
|
|
51
61
|
export interface AiChatReplyResponse extends AiChatResponseBase {
|
|
52
62
|
kind: 'help' | 'general' | 'unsupported';
|
|
53
|
-
/** The reply to show
|
|
63
|
+
/** The reply to show. Markdown — help answers are step-by-step prose. */
|
|
54
64
|
reply: string;
|
|
65
|
+
/**
|
|
66
|
+
* Present on `help` turns that cited an article. The reply's own trailing
|
|
67
|
+
* "Source:" line is stripped server-side once these are extracted, so a
|
|
68
|
+
* client renders links rather than the model's plain-text restatement of
|
|
69
|
+
* them — and every client renders the same thing.
|
|
70
|
+
*/
|
|
71
|
+
sources?: AiHelpSource[];
|
|
55
72
|
}
|
|
56
73
|
export declare type PostAiChatResponse = AiChatQueryResponse | AiChatReplyResponse;
|
|
57
74
|
export {};
|
|
@@ -156,6 +156,11 @@ export interface ISnapshotMembershipSync {
|
|
|
156
156
|
* check (`fromKitId`/`fromKitName` record what they left). Absent on
|
|
157
157
|
* snapshots recorded before the generalised sync existed. */
|
|
158
158
|
severed?: ISnapshotMembershipAsset[];
|
|
159
|
+
/** Assets now travelling with the target asset of a carrier check — one
|
|
160
|
+
* whose target is not a kit but is stocktakable. Present (possibly empty)
|
|
161
|
+
* only for that path: a carrier holds no members, so what a check of it
|
|
162
|
+
* states is company, not containment. */
|
|
163
|
+
carried?: ISnapshotMembershipAsset[];
|
|
159
164
|
}
|
|
160
165
|
export interface GetSnapshotResponse {
|
|
161
166
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/snapshots/[id]/get.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/snapshots/[id]/get.ts"],"names":[],"mappings":";;;AA2PA,QAAQ;AACK,QAAA,sBAAsB,GAAwB;IACzD,EAAE,EAAE,OAAO;IACX,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE;QACR,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,cAAc;KACrB;IACD,QAAQ,EAAE;QACR,YAAY,EAAE,CAAC;QACf,cAAc,EAAE,CAAC;QACjB,YAAY,EAAE,CAAC;QACf,aAAa,EAAE;YACb,KAAK,EAAE,CAAC;YACR,iBAAiB,EAAE,CAAC;YACpB,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC,EAAE,+EAA+E;YAChG,4GAA4G;SAC7G;QACD,cAAc,EAAE;YACd,KAAK,EAAE,CAAC;YACR,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC,EAAE,+EAA+E;SACjG;QACD,UAAU,EAAE;YACV,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,CAAC,EAAE,+DAA+D;SAChF;KACF;IACD,IAAI,EAAE,WAAW;CAClB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.70-alpha.
|
|
4
|
+
"version": "1.0.70-alpha.26",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"@types/geojson": "^7946.0.11",
|
|
19
19
|
"shx": "^0.3.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "bf8c49337cd847f78a8d9a883e9e48e1682f506c"
|
|
22
22
|
}
|