@classic-homes/agent-contracts 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a1.d.ts +17 -0
- package/dist/a1.d.ts.map +1 -0
- package/dist/a1.js +51 -0
- package/dist/a1.js.map +1 -0
- package/dist/api.d.ts +141 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +86 -0
- package/dist/api.js.map +1 -0
- package/dist/auth.d.ts +101 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +101 -0
- package/dist/auth.js.map +1 -0
- package/dist/chat.d.ts +106 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +22 -0
- package/dist/chat.js.map +1 -0
- package/dist/context.d.ts +245 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +173 -0
- package/dist/context.js.map +1 -0
- package/dist/events.d.ts +515 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +178 -0
- package/dist/events.js.map +1 -0
- package/dist/ids.d.ts +31 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +36 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/limits.d.ts +30 -0
- package/dist/limits.d.ts.map +1 -0
- package/dist/limits.js +30 -0
- package/dist/limits.js.map +1 -0
- package/dist/operations.d.ts +137 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +103 -0
- package/dist/operations.js.map +1 -0
- package/dist/sse.d.ts +20 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +54 -0
- package/dist/sse.js.map +1 -0
- package/package.json +31 -3
- package/README.md +0 -3
package/dist/chat.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { DocumentContext } from './context.js';
|
|
3
|
+
import { AgentKey, ConversationId, FileId, RequestId } from './ids.js';
|
|
4
|
+
import { LIMITS } from './limits.js';
|
|
5
|
+
import { OperationResult } from './operations.js';
|
|
6
|
+
/** Which client sent a request. Lets the backend shape tool availability and rendering hints. */
|
|
7
|
+
export const ClientKind = z.enum(['office', 'app']);
|
|
8
|
+
/** Body of `POST /api/chat`. */
|
|
9
|
+
export const ChatRequest = z.object({
|
|
10
|
+
requestId: RequestId,
|
|
11
|
+
/** Omit to start a new conversation; the `start` event returns the assigned ID. */
|
|
12
|
+
conversationId: ConversationId.optional(),
|
|
13
|
+
agent: AgentKey.default('classic-agent'),
|
|
14
|
+
message: z.string().trim().min(1).max(LIMITS.messageChars),
|
|
15
|
+
context: DocumentContext.optional(),
|
|
16
|
+
/** Host-confirmed outcomes of earlier proposals, so the agent can continue accurately. */
|
|
17
|
+
operationResults: z.array(OperationResult).max(LIMITS.operationResults).optional(),
|
|
18
|
+
/** Files already uploaded through `POST /api/files` to attach to this turn. */
|
|
19
|
+
fileIds: z.array(FileId).max(LIMITS.requestFiles).optional(),
|
|
20
|
+
client: ClientKind.optional(),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=chat.js.map
|
package/dist/chat.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,iGAAiG;AACjG,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAGpD,gCAAgC;AAChC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,SAAS,EAAE,SAAS;IACpB,mFAAmF;IACnF,cAAc,EAAE,cAAc,CAAC,QAAQ,EAAE;IACzC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1D,OAAO,EAAE,eAAe,CAAC,QAAQ,EAAE;IACnC,0FAA0F;IAC1F,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;IAClF,+EAA+E;IAC/E,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;IAC5D,MAAM,EAAE,UAAU,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** A single Excel cell value as Office.js reports it. Empty cells are `""`. */
|
|
3
|
+
export declare const CellValue: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
4
|
+
export type CellValue = z.infer<typeof CellValue>;
|
|
5
|
+
export declare const Grid: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
6
|
+
export type Grid = z.infer<typeof Grid>;
|
|
7
|
+
/** Excel sheet names: 1-31 chars, none of `: \ / ? * [ ]`. */
|
|
8
|
+
export declare const SheetName: z.ZodString;
|
|
9
|
+
/** Bounded single-area A1 address without a sheet prefix. */
|
|
10
|
+
export declare const A1Address: z.ZodString;
|
|
11
|
+
export declare function gridShape(grid: readonly (readonly unknown[])[]): [number, number] | null;
|
|
12
|
+
/** True when the grid is rectangular and matches the address dimensions. */
|
|
13
|
+
export declare function gridMatchesAddress(grid: readonly (readonly unknown[])[], address: string): boolean;
|
|
14
|
+
export declare const ExcelSelection: z.ZodObject<{
|
|
15
|
+
sheet: z.ZodString;
|
|
16
|
+
address: z.ZodString;
|
|
17
|
+
values: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
18
|
+
formulas: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type ExcelSelection = z.infer<typeof ExcelSelection>;
|
|
21
|
+
/**
|
|
22
|
+
* Word target captured by the bridge. `targetId` is an opaque, bridge-issued handle valid
|
|
23
|
+
* only while the pane stays open; `expectedText` is re-checked before any write.
|
|
24
|
+
*/
|
|
25
|
+
export declare const WordTarget: z.ZodObject<{
|
|
26
|
+
targetId: z.ZodString;
|
|
27
|
+
expectedText: z.ZodString;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type WordTarget = z.infer<typeof WordTarget>;
|
|
30
|
+
export declare const WordSelection: z.ZodObject<{
|
|
31
|
+
text: z.ZodString;
|
|
32
|
+
isEmpty: z.ZodBoolean;
|
|
33
|
+
target: z.ZodObject<{
|
|
34
|
+
targetId: z.ZodString;
|
|
35
|
+
expectedText: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type WordSelection = z.infer<typeof WordSelection>;
|
|
39
|
+
export declare const ExcelContext: z.ZodObject<{
|
|
40
|
+
selection: z.ZodObject<{
|
|
41
|
+
sheet: z.ZodString;
|
|
42
|
+
address: z.ZodString;
|
|
43
|
+
values: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
44
|
+
formulas: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
documentId: z.ZodString;
|
|
47
|
+
capturedAt: z.ZodISODateTime;
|
|
48
|
+
simulated: z.ZodBoolean;
|
|
49
|
+
host: z.ZodLiteral<"excel">;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export declare const WordContext: z.ZodObject<{
|
|
52
|
+
selection: z.ZodObject<{
|
|
53
|
+
text: z.ZodString;
|
|
54
|
+
isEmpty: z.ZodBoolean;
|
|
55
|
+
target: z.ZodObject<{
|
|
56
|
+
targetId: z.ZodString;
|
|
57
|
+
expectedText: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
documentId: z.ZodString;
|
|
61
|
+
capturedAt: z.ZodISODateTime;
|
|
62
|
+
simulated: z.ZodBoolean;
|
|
63
|
+
host: z.ZodLiteral<"word">;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
/** Kinds of Classic App records a page can put in front of the agent. */
|
|
66
|
+
export declare const AppRecordKind: z.ZodEnum<{
|
|
67
|
+
home: "home";
|
|
68
|
+
lot: "lot";
|
|
69
|
+
community: "community";
|
|
70
|
+
filing: "filing";
|
|
71
|
+
floorplan: "floorplan";
|
|
72
|
+
elevation: "elevation";
|
|
73
|
+
district: "district";
|
|
74
|
+
user: "user";
|
|
75
|
+
vendor: "vendor";
|
|
76
|
+
sign: "sign";
|
|
77
|
+
"slide-deck": "slide-deck";
|
|
78
|
+
survey: "survey";
|
|
79
|
+
workspace: "workspace";
|
|
80
|
+
walk: "walk";
|
|
81
|
+
permit: "permit";
|
|
82
|
+
incentive: "incentive";
|
|
83
|
+
}>;
|
|
84
|
+
export type AppRecordKind = z.infer<typeof AppRecordKind>;
|
|
85
|
+
export declare const AppRecordRef: z.ZodObject<{
|
|
86
|
+
kind: z.ZodEnum<{
|
|
87
|
+
home: "home";
|
|
88
|
+
lot: "lot";
|
|
89
|
+
community: "community";
|
|
90
|
+
filing: "filing";
|
|
91
|
+
floorplan: "floorplan";
|
|
92
|
+
elevation: "elevation";
|
|
93
|
+
district: "district";
|
|
94
|
+
user: "user";
|
|
95
|
+
vendor: "vendor";
|
|
96
|
+
sign: "sign";
|
|
97
|
+
"slide-deck": "slide-deck";
|
|
98
|
+
survey: "survey";
|
|
99
|
+
workspace: "workspace";
|
|
100
|
+
walk: "walk";
|
|
101
|
+
permit: "permit";
|
|
102
|
+
incentive: "incentive";
|
|
103
|
+
}>;
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
label: z.ZodString;
|
|
106
|
+
path: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
export type AppRecordRef = z.infer<typeof AppRecordRef>;
|
|
109
|
+
/**
|
|
110
|
+
* Scope the backend resolves company agent context for (CHAPI `/v2/agent-context/resolve`).
|
|
111
|
+
* At most one key, mirroring that endpoint. The app never sends the resolved text itself.
|
|
112
|
+
*/
|
|
113
|
+
export declare const AgentContextTarget: z.ZodObject<{
|
|
114
|
+
homeRid: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
lotRid: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
elevationRid: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
floorplanRid: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
filingRid: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
communityRid: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
districtId: z.ZodOptional<z.ZodString>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type AgentContextTarget = z.infer<typeof AgentContextTarget>;
|
|
123
|
+
/**
|
|
124
|
+
* Context a Classic App page attaches to a turn: where the user is and which record they are
|
|
125
|
+
* looking at. Sent per turn, only when the user keeps the context toggle on. Never the page's
|
|
126
|
+
* whole data set; `facts` are a page-chosen whitelist.
|
|
127
|
+
*/
|
|
128
|
+
export declare const AppContext: z.ZodObject<{
|
|
129
|
+
host: z.ZodLiteral<"app">;
|
|
130
|
+
capturedAt: z.ZodISODateTime;
|
|
131
|
+
route: z.ZodString;
|
|
132
|
+
title: z.ZodString;
|
|
133
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
134
|
+
record: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
kind: z.ZodEnum<{
|
|
136
|
+
home: "home";
|
|
137
|
+
lot: "lot";
|
|
138
|
+
community: "community";
|
|
139
|
+
filing: "filing";
|
|
140
|
+
floorplan: "floorplan";
|
|
141
|
+
elevation: "elevation";
|
|
142
|
+
district: "district";
|
|
143
|
+
user: "user";
|
|
144
|
+
vendor: "vendor";
|
|
145
|
+
sign: "sign";
|
|
146
|
+
"slide-deck": "slide-deck";
|
|
147
|
+
survey: "survey";
|
|
148
|
+
workspace: "workspace";
|
|
149
|
+
walk: "walk";
|
|
150
|
+
permit: "permit";
|
|
151
|
+
incentive: "incentive";
|
|
152
|
+
}>;
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
label: z.ZodString;
|
|
155
|
+
path: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
158
|
+
homeRid: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
lotRid: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
elevationRid: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
floorplanRid: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
filingRid: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
communityRid: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
districtId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
167
|
+
selection: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
export type AppContext = z.infer<typeof AppContext>;
|
|
170
|
+
/**
|
|
171
|
+
* Explicitly serialized context for one turn: an Office selection or a Classic App page.
|
|
172
|
+
* Never the whole workbook, document or data set.
|
|
173
|
+
*/
|
|
174
|
+
export declare const DocumentContext: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
175
|
+
selection: z.ZodObject<{
|
|
176
|
+
sheet: z.ZodString;
|
|
177
|
+
address: z.ZodString;
|
|
178
|
+
values: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
179
|
+
formulas: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
documentId: z.ZodString;
|
|
182
|
+
capturedAt: z.ZodISODateTime;
|
|
183
|
+
simulated: z.ZodBoolean;
|
|
184
|
+
host: z.ZodLiteral<"excel">;
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
+
selection: z.ZodObject<{
|
|
187
|
+
text: z.ZodString;
|
|
188
|
+
isEmpty: z.ZodBoolean;
|
|
189
|
+
target: z.ZodObject<{
|
|
190
|
+
targetId: z.ZodString;
|
|
191
|
+
expectedText: z.ZodString;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
documentId: z.ZodString;
|
|
195
|
+
capturedAt: z.ZodISODateTime;
|
|
196
|
+
simulated: z.ZodBoolean;
|
|
197
|
+
host: z.ZodLiteral<"word">;
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
+
host: z.ZodLiteral<"app">;
|
|
200
|
+
capturedAt: z.ZodISODateTime;
|
|
201
|
+
route: z.ZodString;
|
|
202
|
+
title: z.ZodString;
|
|
203
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
204
|
+
record: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
kind: z.ZodEnum<{
|
|
206
|
+
home: "home";
|
|
207
|
+
lot: "lot";
|
|
208
|
+
community: "community";
|
|
209
|
+
filing: "filing";
|
|
210
|
+
floorplan: "floorplan";
|
|
211
|
+
elevation: "elevation";
|
|
212
|
+
district: "district";
|
|
213
|
+
user: "user";
|
|
214
|
+
vendor: "vendor";
|
|
215
|
+
sign: "sign";
|
|
216
|
+
"slide-deck": "slide-deck";
|
|
217
|
+
survey: "survey";
|
|
218
|
+
workspace: "workspace";
|
|
219
|
+
walk: "walk";
|
|
220
|
+
permit: "permit";
|
|
221
|
+
incentive: "incentive";
|
|
222
|
+
}>;
|
|
223
|
+
id: z.ZodString;
|
|
224
|
+
label: z.ZodString;
|
|
225
|
+
path: z.ZodOptional<z.ZodString>;
|
|
226
|
+
}, z.core.$strip>>;
|
|
227
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
homeRid: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
lotRid: z.ZodOptional<z.ZodNumber>;
|
|
230
|
+
elevationRid: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
floorplanRid: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
filingRid: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
communityRid: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
districtId: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, z.core.$strip>>;
|
|
236
|
+
facts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
237
|
+
selection: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, z.core.$strip>], "host">;
|
|
239
|
+
export type DocumentContext = z.infer<typeof DocumentContext>;
|
|
240
|
+
export type ExcelContext = z.infer<typeof ExcelContext>;
|
|
241
|
+
export type WordContext = z.infer<typeof WordContext>;
|
|
242
|
+
/** A captured Office selection: the only contexts a document edit can be proposed against. */
|
|
243
|
+
export type OfficeContext = ExcelContext | WordContext;
|
|
244
|
+
export declare function isOfficeContext(context: DocumentContext): context is OfficeContext;
|
|
245
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,+EAA+E;AAC/E,eAAO,MAAM,SAAS,0EAKpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,IAAI,kGAA8B,CAAC;AAChD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,8DAA8D;AAC9D,eAAO,MAAM,SAAS,aAIK,CAAC;AAE5B,6DAA6D;AAC7D,eAAO,MAAM,SAAS,aAIyE,CAAC;AAEhG,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAKxF;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,EACrC,OAAO,EAAE,MAAM,GACd,OAAO,CAIT;AAED,eAAO,MAAM,cAAc;;;;;iBAwBvB,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,UAAU;;;iBAGrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,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AO,WAAW,CAAC,CAAC;AAEtD,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,WAAW,CAAC;AACvD,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,IAAI,aAAa,CAElF"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { parseA1Range } from './a1.js';
|
|
3
|
+
import { DocumentId } from './ids.js';
|
|
4
|
+
import { LIMITS } from './limits.js';
|
|
5
|
+
/** A single Excel cell value as Office.js reports it. Empty cells are `""`. */
|
|
6
|
+
export const CellValue = z.union([
|
|
7
|
+
z.string().max(LIMITS.excelCellChars),
|
|
8
|
+
z.number(),
|
|
9
|
+
z.boolean(),
|
|
10
|
+
z.null(),
|
|
11
|
+
]);
|
|
12
|
+
export const Grid = z.array(z.array(CellValue));
|
|
13
|
+
/** Excel sheet names: 1-31 chars, none of `: \ / ? * [ ]`. */
|
|
14
|
+
export const SheetName = z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(31)
|
|
18
|
+
.regex(/^[^:\\/?*[\]]+$/);
|
|
19
|
+
/** Bounded single-area A1 address without a sheet prefix. */
|
|
20
|
+
export const A1Address = z
|
|
21
|
+
.string()
|
|
22
|
+
.min(2)
|
|
23
|
+
.max(32)
|
|
24
|
+
.refine((value) => parseA1Range(value) !== null, 'Expected a bounded A1 range such as B2:D5');
|
|
25
|
+
export function gridShape(grid) {
|
|
26
|
+
const rows = grid.length;
|
|
27
|
+
const cols = grid[0]?.length ?? 0;
|
|
28
|
+
if (rows === 0 || cols === 0)
|
|
29
|
+
return null;
|
|
30
|
+
return grid.every((row) => row.length === cols) ? [rows, cols] : null;
|
|
31
|
+
}
|
|
32
|
+
/** True when the grid is rectangular and matches the address dimensions. */
|
|
33
|
+
export function gridMatchesAddress(grid, address) {
|
|
34
|
+
const range = parseA1Range(address);
|
|
35
|
+
const shape = gridShape(grid);
|
|
36
|
+
return !!range && !!shape && shape[0] === range.rowCount && shape[1] === range.columnCount;
|
|
37
|
+
}
|
|
38
|
+
export const ExcelSelection = z
|
|
39
|
+
.object({
|
|
40
|
+
sheet: SheetName,
|
|
41
|
+
address: A1Address,
|
|
42
|
+
values: Grid,
|
|
43
|
+
/** Formulas as Office.js reports them: a formula string, or the constant value. */
|
|
44
|
+
formulas: Grid,
|
|
45
|
+
})
|
|
46
|
+
.superRefine((sel, ctx) => {
|
|
47
|
+
const range = parseA1Range(sel.address);
|
|
48
|
+
if (range && range.rowCount * range.columnCount > LIMITS.excelCells) {
|
|
49
|
+
ctx.addIssue({ code: 'custom', message: `Selection exceeds ${LIMITS.excelCells} cells` });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (!gridMatchesAddress(sel.values, sel.address)) {
|
|
53
|
+
ctx.addIssue({ code: 'custom', path: ['values'], message: 'values do not match address' });
|
|
54
|
+
}
|
|
55
|
+
if (!gridMatchesAddress(sel.formulas, sel.address)) {
|
|
56
|
+
ctx.addIssue({
|
|
57
|
+
code: 'custom',
|
|
58
|
+
path: ['formulas'],
|
|
59
|
+
message: 'formulas do not match address',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* Word target captured by the bridge. `targetId` is an opaque, bridge-issued handle valid
|
|
65
|
+
* only while the pane stays open; `expectedText` is re-checked before any write.
|
|
66
|
+
*/
|
|
67
|
+
export const WordTarget = z.object({
|
|
68
|
+
targetId: z.string().min(1).max(128),
|
|
69
|
+
expectedText: z.string().max(LIMITS.wordChars),
|
|
70
|
+
});
|
|
71
|
+
export const WordSelection = z.object({
|
|
72
|
+
text: z.string().max(LIMITS.wordChars),
|
|
73
|
+
isEmpty: z.boolean(),
|
|
74
|
+
target: WordTarget,
|
|
75
|
+
});
|
|
76
|
+
const contextBase = {
|
|
77
|
+
documentId: DocumentId,
|
|
78
|
+
capturedAt: z.iso.datetime(),
|
|
79
|
+
/** True when produced by the browser simulator rather than a real Office host. */
|
|
80
|
+
simulated: z.boolean(),
|
|
81
|
+
};
|
|
82
|
+
export const ExcelContext = z.object({
|
|
83
|
+
host: z.literal('excel'),
|
|
84
|
+
...contextBase,
|
|
85
|
+
selection: ExcelSelection,
|
|
86
|
+
});
|
|
87
|
+
export const WordContext = z.object({
|
|
88
|
+
host: z.literal('word'),
|
|
89
|
+
...contextBase,
|
|
90
|
+
selection: WordSelection,
|
|
91
|
+
});
|
|
92
|
+
/** Kinds of Classic App records a page can put in front of the agent. */
|
|
93
|
+
export const AppRecordKind = z.enum([
|
|
94
|
+
'home',
|
|
95
|
+
'lot',
|
|
96
|
+
'community',
|
|
97
|
+
'filing',
|
|
98
|
+
'floorplan',
|
|
99
|
+
'elevation',
|
|
100
|
+
'district',
|
|
101
|
+
'user',
|
|
102
|
+
'vendor',
|
|
103
|
+
'sign',
|
|
104
|
+
'slide-deck',
|
|
105
|
+
'survey',
|
|
106
|
+
'workspace',
|
|
107
|
+
'walk',
|
|
108
|
+
'permit',
|
|
109
|
+
'incentive',
|
|
110
|
+
]);
|
|
111
|
+
export const AppRecordRef = z.object({
|
|
112
|
+
kind: AppRecordKind,
|
|
113
|
+
/** The record's own key in CHAPI (homeRid, lotRid, bunitRid, uuid, ...). */
|
|
114
|
+
id: z.string().min(1).max(64),
|
|
115
|
+
label: z.string().min(1).max(200),
|
|
116
|
+
/** App path the agent may link back to. Path only, no origin or query. */
|
|
117
|
+
path: z.string().startsWith('/').max(500).optional(),
|
|
118
|
+
});
|
|
119
|
+
const rid = z.number().int().positive();
|
|
120
|
+
/**
|
|
121
|
+
* Scope the backend resolves company agent context for (CHAPI `/v2/agent-context/resolve`).
|
|
122
|
+
* At most one key, mirroring that endpoint. The app never sends the resolved text itself.
|
|
123
|
+
*/
|
|
124
|
+
export const AgentContextTarget = z
|
|
125
|
+
.object({
|
|
126
|
+
homeRid: rid.optional(),
|
|
127
|
+
lotRid: rid.optional(),
|
|
128
|
+
elevationRid: rid.optional(),
|
|
129
|
+
floorplanRid: rid.optional(),
|
|
130
|
+
filingRid: rid.optional(),
|
|
131
|
+
communityRid: rid.optional(),
|
|
132
|
+
districtId: z.string().min(1).max(64).optional(),
|
|
133
|
+
})
|
|
134
|
+
.refine((t) => Object.values(t).filter((v) => v !== undefined).length <= 1, {
|
|
135
|
+
message: 'at most one scope key',
|
|
136
|
+
});
|
|
137
|
+
const FactValue = z.union([z.string().max(LIMITS.appFactChars), z.number(), z.boolean(), z.null()]);
|
|
138
|
+
/**
|
|
139
|
+
* Context a Classic App page attaches to a turn: where the user is and which record they are
|
|
140
|
+
* looking at. Sent per turn, only when the user keeps the context toggle on. Never the page's
|
|
141
|
+
* whole data set; `facts` are a page-chosen whitelist.
|
|
142
|
+
*/
|
|
143
|
+
export const AppContext = z.object({
|
|
144
|
+
host: z.literal('app'),
|
|
145
|
+
capturedAt: z.iso.datetime(),
|
|
146
|
+
/** App pathname only, no origin or query. */
|
|
147
|
+
route: z.string().startsWith('/').max(300),
|
|
148
|
+
title: z.string().max(200),
|
|
149
|
+
tab: z.string().max(60).optional(),
|
|
150
|
+
record: AppRecordRef.optional(),
|
|
151
|
+
target: AgentContextTarget.optional(),
|
|
152
|
+
facts: z
|
|
153
|
+
.record(z.string().min(1).max(40), FactValue)
|
|
154
|
+
.refine((f) => Object.keys(f).length <= LIMITS.appFacts, {
|
|
155
|
+
message: `at most ${LIMITS.appFacts} facts`,
|
|
156
|
+
})
|
|
157
|
+
.optional(),
|
|
158
|
+
/** Text the user highlighted on the page, if any. */
|
|
159
|
+
selection: z.string().max(LIMITS.appSelectionChars).optional(),
|
|
160
|
+
});
|
|
161
|
+
/**
|
|
162
|
+
* Explicitly serialized context for one turn: an Office selection or a Classic App page.
|
|
163
|
+
* Never the whole workbook, document or data set.
|
|
164
|
+
*/
|
|
165
|
+
export const DocumentContext = z.discriminatedUnion('host', [
|
|
166
|
+
ExcelContext,
|
|
167
|
+
WordContext,
|
|
168
|
+
AppContext,
|
|
169
|
+
]);
|
|
170
|
+
export function isOfficeContext(context) {
|
|
171
|
+
return context.host === 'excel' || context.host === 'word';
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC;IAC/B,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC;IACrC,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,OAAO,EAAE;IACX,CAAC,CAAC,IAAI,EAAE;CACT,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AAGhD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAE5B,6DAA6D;AAC7D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,2CAA2C,CAAC,CAAC;AAEhG,MAAM,UAAU,SAAS,CAAC,IAA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