@sudobility/raidr_agent_lib 0.0.5 → 0.0.7

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.
Files changed (41) hide show
  1. package/dist/business/index.d.ts +1 -0
  2. package/dist/business/index.d.ts.map +1 -1
  3. package/dist/business/index.js +1 -0
  4. package/dist/business/index.js.map +1 -1
  5. package/dist/business/runner/directConnector.d.ts +29 -0
  6. package/dist/business/runner/directConnector.d.ts.map +1 -0
  7. package/dist/business/runner/directConnector.js +76 -0
  8. package/dist/business/runner/directConnector.js.map +1 -0
  9. package/dist/business/runner/ids.d.ts +2 -0
  10. package/dist/business/runner/ids.d.ts.map +1 -0
  11. package/dist/business/runner/ids.js +16 -0
  12. package/dist/business/runner/ids.js.map +1 -0
  13. package/dist/business/runner/index.d.ts +9 -0
  14. package/dist/business/runner/index.d.ts.map +1 -0
  15. package/dist/business/runner/index.js +9 -0
  16. package/dist/business/runner/index.js.map +1 -0
  17. package/dist/business/runner/pageUrl.d.ts +9 -0
  18. package/dist/business/runner/pageUrl.d.ts.map +1 -0
  19. package/dist/business/runner/pageUrl.js +172 -0
  20. package/dist/business/runner/pageUrl.js.map +1 -0
  21. package/dist/business/runner/recorder.d.ts +14 -0
  22. package/dist/business/runner/recorder.d.ts.map +1 -0
  23. package/dist/business/runner/recorder.js +68 -0
  24. package/dist/business/runner/recorder.js.map +1 -0
  25. package/dist/business/runner/runner.d.ts +72 -0
  26. package/dist/business/runner/runner.d.ts.map +1 -0
  27. package/dist/business/runner/runner.js +340 -0
  28. package/dist/business/runner/runner.js.map +1 -0
  29. package/dist/business/runner/schemas.d.ts +159 -0
  30. package/dist/business/runner/schemas.d.ts.map +1 -0
  31. package/dist/business/runner/schemas.js +415 -0
  32. package/dist/business/runner/schemas.js.map +1 -0
  33. package/dist/business/runner/stepSchemas.d.ts +9 -0
  34. package/dist/business/runner/stepSchemas.d.ts.map +1 -0
  35. package/dist/business/runner/stepSchemas.js +511 -0
  36. package/dist/business/runner/stepSchemas.js.map +1 -0
  37. package/dist/business/runner/steps.d.ts +37 -0
  38. package/dist/business/runner/steps.d.ts.map +1 -0
  39. package/dist/business/runner/steps.js +197 -0
  40. package/dist/business/runner/steps.js.map +1 -0
  41. package/package.json +21 -6
@@ -0,0 +1,511 @@
1
+ export const STEP_ENDPOINTS = {
2
+ understand: 'understand-intent',
3
+ 'rank-sites': 'rank-sites',
4
+ prepare: 'prepare-site',
5
+ plan: 'plan-calls',
6
+ extract: 'extract-results',
7
+ 'pick-best': 'pick-best',
8
+ };
9
+ const str = (description, extra = {}) => ({
10
+ type: 'string',
11
+ description,
12
+ ...extra,
13
+ });
14
+ const location = {
15
+ type: 'object',
16
+ description: 'Device position in decimal degrees.',
17
+ properties: {
18
+ latitude: { type: 'number', description: 'Latitude, -90 to 90.' },
19
+ longitude: { type: 'number', description: 'Longitude, -180 to 180.' },
20
+ accuracy: { type: 'number', description: 'Accuracy radius in meters.' },
21
+ },
22
+ required: ['latitude', 'longitude'],
23
+ };
24
+ const intentInput = {
25
+ type: 'object',
26
+ description: 'The understood request (output of understand-intent): intent, labels, slots, resultKind, query, what, who, how, when, where, why, selection, location_needed.',
27
+ };
28
+ const site = {
29
+ type: 'object',
30
+ description: 'The site being worked on.',
31
+ properties: {
32
+ apiHost: str('API host, e.g. api.example.com.'),
33
+ title: str('Site name.'),
34
+ description: str('What the site is.'),
35
+ },
36
+ required: ['apiHost', 'title'],
37
+ };
38
+ const understandInput = {
39
+ type: 'object',
40
+ properties: {
41
+ request: str("The user's request, in their words."),
42
+ vocabulary: {
43
+ type: 'array',
44
+ description: 'Every site label in the catalog. Pick labels from this list only.',
45
+ items: { type: 'string' },
46
+ },
47
+ country: str("ISO 3166-1 alpha-2 of the user's region, e.g. US."),
48
+ locale: str("BCP 47 locale of the user's device, e.g. en-US."),
49
+ timeZone: str("IANA time zone of the user's device, e.g. America/New_York."),
50
+ now: str("The device's current date-time, ISO 8601 with offset."),
51
+ },
52
+ required: ['request', 'vocabulary'],
53
+ };
54
+ const understandOutput = {
55
+ type: 'object',
56
+ properties: {
57
+ intent: str('Short lowercase slug of the task, e.g. recipe, event_search, flight_booking, apartment_rental, bank_transactions.', { maxLength: 60 }),
58
+ labels: {
59
+ type: 'array',
60
+ description: 'Up to 6 labels from the vocabulary that a site able to answer this would carry, most relevant first.',
61
+ items: { type: 'string' },
62
+ maxItems: 6,
63
+ },
64
+ slots: {
65
+ type: 'array',
66
+ description: 'Concrete values named in the request (dish, artist, budget, cuisine...). Empty when none.',
67
+ items: {
68
+ type: 'object',
69
+ properties: {
70
+ name: str('snake_case name, e.g. dish, price_max.'),
71
+ value: str('The value as the user said it.'),
72
+ },
73
+ required: ['name', 'value'],
74
+ },
75
+ maxItems: 10,
76
+ },
77
+ resultKind: str('The shape of an answer; picks the result view.', {
78
+ enum: [
79
+ 'recipe',
80
+ 'product',
81
+ 'article',
82
+ 'place',
83
+ 'media',
84
+ 'financial',
85
+ 'generic',
86
+ ],
87
+ }),
88
+ query: str('A short search query to send to the sites (keywords, no filler).', { maxLength: 300 }),
89
+ what: str('The action in a few words, e.g. find events, book a flight.', {
90
+ maxLength: 200,
91
+ }),
92
+ who: {
93
+ type: 'object',
94
+ description: 'Who it is for, or null when the request does not say or it does not matter.',
95
+ properties: {
96
+ kind: str('self: just the user; party: several people.', {
97
+ enum: ['self', 'party'],
98
+ }),
99
+ partySize: {
100
+ type: 'integer',
101
+ description: 'Number of people including the user, when known.',
102
+ minimum: 1,
103
+ maximum: 100,
104
+ },
105
+ description: str('e.g. 2 adults, 1 child.'),
106
+ },
107
+ required: ['kind'],
108
+ },
109
+ how: str('Constraints or preferences (cheapest, under $2000/month, vegetarian, 4+ stars), or null.'),
110
+ when: {
111
+ type: 'object',
112
+ description: 'When, or null when the request has no time. Resolve start/end against now and timeZone.',
113
+ properties: {
114
+ text: str('The words the user used, e.g. tonight, next weekend.'),
115
+ start: str('ISO 8601 date or date-time with offset.'),
116
+ end: str('ISO 8601 date or date-time with offset.'),
117
+ },
118
+ required: ['text'],
119
+ },
120
+ where: {
121
+ type: 'object',
122
+ description: "Where, or null when place does not matter. current: near the user's device (near me, nearby, tonight in town); place: one named place; places: several (origin and destination).",
123
+ properties: {
124
+ kind: str('current, place or places.', {
125
+ enum: ['current', 'place', 'places'],
126
+ }),
127
+ places: {
128
+ type: 'array',
129
+ description: 'Named places; empty for current.',
130
+ items: {
131
+ type: 'object',
132
+ properties: {
133
+ name: str('Place name as the user said it, e.g. Paris, SFO.'),
134
+ role: str('Its role.', {
135
+ enum: ['area', 'origin', 'destination', 'stop'],
136
+ }),
137
+ },
138
+ required: ['name'],
139
+ },
140
+ },
141
+ },
142
+ required: ['kind', 'places'],
143
+ },
144
+ why: str('The purpose when the user states it (a birthday dinner), or null.'),
145
+ selection: str('single: one site, one answer; best: compare several sites and pick one; all: list everything from several sites.', { enum: ['single', 'best', 'all'] }),
146
+ location_needed: {
147
+ type: 'boolean',
148
+ description: 'true exactly when where.kind is current.',
149
+ },
150
+ },
151
+ required: [
152
+ 'intent',
153
+ 'labels',
154
+ 'slots',
155
+ 'resultKind',
156
+ 'query',
157
+ 'what',
158
+ 'who',
159
+ 'how',
160
+ 'when',
161
+ 'where',
162
+ 'why',
163
+ 'selection',
164
+ 'location_needed',
165
+ ],
166
+ };
167
+ const rankInput = {
168
+ type: 'object',
169
+ properties: {
170
+ request: str("The user's request."),
171
+ intent: intentInput,
172
+ country: str("ISO 3166-1 alpha-2 of the user's region."),
173
+ sites: {
174
+ type: 'array',
175
+ description: 'Candidate sites from the catalog.',
176
+ items: {
177
+ type: 'object',
178
+ properties: {
179
+ apiHost: str('API host; copy it exactly into the answer.'),
180
+ title: str('Site name.'),
181
+ description: str('What the site is.'),
182
+ labels: { type: 'array', items: { type: 'string' } },
183
+ toolCount: { type: 'integer', description: 'Number of API tools.' },
184
+ },
185
+ required: ['apiHost', 'title'],
186
+ },
187
+ },
188
+ },
189
+ required: ['request', 'intent', 'sites'],
190
+ };
191
+ const rankOutput = {
192
+ type: 'object',
193
+ properties: {
194
+ sites: {
195
+ type: 'array',
196
+ description: 'The sites that can really serve this request, best first. Leave unsuitable ones out.',
197
+ items: {
198
+ type: 'object',
199
+ properties: {
200
+ apiHost: str('Exactly as given in the input.'),
201
+ reason: str('One short sentence for the user: why this site fits the request.', { maxLength: 300 }),
202
+ },
203
+ required: ['apiHost', 'reason'],
204
+ },
205
+ maxItems: 12,
206
+ },
207
+ },
208
+ required: ['sites'],
209
+ };
210
+ const prepareInput = {
211
+ type: 'object',
212
+ properties: {
213
+ request: str("The user's request."),
214
+ intent: intentInput,
215
+ location,
216
+ site,
217
+ tools: {
218
+ type: 'array',
219
+ description: "The site's API tools, most likely useful first.",
220
+ items: {
221
+ type: 'object',
222
+ properties: {
223
+ name: str('Tool name.'),
224
+ description: str('What it does.'),
225
+ inputSchema: {
226
+ type: 'object',
227
+ description: 'JSON Schema of its arguments.',
228
+ },
229
+ auth: str("none: works signed out; user: needs the user's account; api_key: needs a site key; unknown: not documented.", { enum: ['none', 'user', 'api_key', 'unknown'] }),
230
+ },
231
+ required: ['name', 'description', 'auth'],
232
+ },
233
+ },
234
+ },
235
+ required: ['request', 'intent', 'site', 'tools'],
236
+ };
237
+ const formFieldOutput = {
238
+ type: 'object',
239
+ properties: {
240
+ name: str('Canonical snake_case name: keyword, category, start_date, end_date, price_min, price_max, party_size, origin, destination, bedrooms...'),
241
+ label: str('Short label shown to the user.'),
242
+ type: str('Input control.', {
243
+ enum: [
244
+ 'text',
245
+ 'number',
246
+ 'date',
247
+ 'datetime',
248
+ 'select',
249
+ 'multiselect',
250
+ 'boolean',
251
+ ],
252
+ }),
253
+ required: {
254
+ type: 'boolean',
255
+ description: 'true only when the tools cannot run without it.',
256
+ },
257
+ description: str('One line of help, optional.'),
258
+ options: {
259
+ type: 'array',
260
+ description: 'Choices for select/multiselect (from the tool schema enum).',
261
+ items: {
262
+ type: 'object',
263
+ properties: {
264
+ value: str('Value sent to the tool.'),
265
+ label: str('Shown to the user.'),
266
+ },
267
+ required: ['value', 'label'],
268
+ },
269
+ },
270
+ default: {
271
+ description: 'Prefilled value taken from the intent (string, number, boolean, or array of strings for multiselect).',
272
+ },
273
+ },
274
+ required: ['name', 'label', 'type', 'required'],
275
+ };
276
+ const prepareOutput = {
277
+ type: 'object',
278
+ properties: {
279
+ tools: {
280
+ type: 'array',
281
+ description: 'Up to 6 tool names (exactly as listed) worth calling for this request, most useful first.',
282
+ items: { type: 'string' },
283
+ maxItems: 6,
284
+ },
285
+ login: str("required: the request is about the user's own data/account, or every useful tool needs the user's account and is personal; fallback: tools are flagged user but the request is public, so try signed out first; none: no sign-in.", { enum: ['required', 'fallback', 'none'] }),
286
+ loginReason: str('When login is not none: one short sentence for the user on why signing in helps.'),
287
+ unsupported: str('Only when this site cannot serve the request at all: why, in one sentence. Otherwise omit it.'),
288
+ fields: {
289
+ type: 'array',
290
+ description: 'Inputs to ask the user for: only what the chosen tools need that the intent does not already answer. Empty when nothing is missing.',
291
+ items: formFieldOutput,
292
+ maxItems: 8,
293
+ },
294
+ },
295
+ required: ['tools', 'login', 'fields'],
296
+ };
297
+ const planInput = {
298
+ type: 'object',
299
+ properties: {
300
+ request: str("The user's request."),
301
+ intent: str('Intent slug.'),
302
+ query: str('Search query.'),
303
+ what: str('The action.'),
304
+ who: { type: 'object', description: 'Who it is for, or null.' },
305
+ how: str('Constraints or preferences, or null.'),
306
+ when: {
307
+ type: 'object',
308
+ description: 'When (text, start, end ISO 8601), or null.',
309
+ },
310
+ where: {
311
+ type: 'object',
312
+ description: 'Where (kind, places), or null.',
313
+ },
314
+ location,
315
+ inputs: {
316
+ type: 'object',
317
+ description: "The user's answers to the prepared form, by field name. Use them as tool arguments.",
318
+ },
319
+ preferredTools: {
320
+ type: 'array',
321
+ description: 'Tools chosen for this request; prefer them.',
322
+ items: { type: 'string' },
323
+ },
324
+ site,
325
+ tools: {
326
+ type: 'array',
327
+ description: 'Every tool you may call (name, description, inputSchema).',
328
+ items: { type: 'object' },
329
+ },
330
+ history: {
331
+ type: 'array',
332
+ description: 'Calls made so far: tool, arguments, status (HTTP status or error), excerpt of the response.',
333
+ items: { type: 'object' },
334
+ },
335
+ },
336
+ required: ['request', 'intent', 'query', 'site', 'tools', 'history'],
337
+ };
338
+ const planOutput = {
339
+ type: 'object',
340
+ properties: {
341
+ done: {
342
+ type: 'boolean',
343
+ description: 'true when the history already holds enough to answer (or nothing more can help).',
344
+ },
345
+ calls: {
346
+ type: 'array',
347
+ description: 'Up to 3 calls to make now; empty when done.',
348
+ items: {
349
+ type: 'object',
350
+ properties: {
351
+ tool: str('Tool name, exactly as listed.'),
352
+ arguments: str('The arguments as a JSON object encoded in a string, matching the tool inputSchema, e.g. {"q":"pad thai","limit":10}.'),
353
+ reason: str('Why this call, a few words.'),
354
+ },
355
+ required: ['tool', 'arguments'],
356
+ },
357
+ maxItems: 3,
358
+ },
359
+ },
360
+ required: ['done', 'calls'],
361
+ };
362
+ const extractInput = {
363
+ type: 'object',
364
+ properties: {
365
+ request: str("The user's request."),
366
+ resultKind: str('The kind of answer wanted.'),
367
+ location,
368
+ site,
369
+ responses: {
370
+ type: 'array',
371
+ description: 'Successful API responses of this run.',
372
+ items: {
373
+ type: 'object',
374
+ properties: {
375
+ callId: str('Id of the call; copy it into ref.callId.'),
376
+ tool: str('Tool that was called.'),
377
+ endpoint: str('Its endpoint, e.g. GET /events/search.'),
378
+ excerpt: str('The response body (JSON), possibly cut off.'),
379
+ },
380
+ required: ['callId', 'tool', 'endpoint', 'excerpt'],
381
+ },
382
+ },
383
+ },
384
+ required: ['request', 'resultKind', 'site', 'responses'],
385
+ };
386
+ const extractOutput = {
387
+ type: 'object',
388
+ properties: {
389
+ items: {
390
+ type: 'array',
391
+ description: 'Up to 10 results that answer the request, best first. Only things present in the responses.',
392
+ maxItems: 10,
393
+ items: {
394
+ type: 'object',
395
+ properties: {
396
+ title: str('Name of the thing.'),
397
+ summary: str('One or two sentences from the data.'),
398
+ imageUrl: str('An absolute image URL copied verbatim from the data, or empty.'),
399
+ sourceUrl: str('An absolute URL copied verbatim from the data, or empty. Never build or guess one.'),
400
+ location: {
401
+ type: 'object',
402
+ description: 'Coordinates when the data gives them for this result, else null.',
403
+ properties: {
404
+ latitude: { type: 'number', description: '-90 to 90.' },
405
+ longitude: { type: 'number', description: '-180 to 180.' },
406
+ },
407
+ required: ['latitude', 'longitude'],
408
+ },
409
+ recipe: {
410
+ type: 'object',
411
+ description: 'For recipe results only; null otherwise.',
412
+ properties: {
413
+ ingredients: {
414
+ type: 'array',
415
+ description: 'With amounts, e.g. 200 g rice noodles.',
416
+ items: { type: 'string' },
417
+ },
418
+ steps: {
419
+ type: 'array',
420
+ description: 'Steps in order.',
421
+ items: { type: 'string' },
422
+ },
423
+ totalMinutes: {
424
+ type: 'number',
425
+ description: 'Total time in minutes, or null.',
426
+ },
427
+ servings: { type: 'number', description: 'Servings, or null.' },
428
+ },
429
+ required: ['ingredients', 'steps', 'totalMinutes', 'servings'],
430
+ },
431
+ fields: {
432
+ type: 'array',
433
+ description: 'Key facts as label/value pairs (price, date, venue, rating...).',
434
+ items: {
435
+ type: 'object',
436
+ properties: {
437
+ label: str('e.g. Price.'),
438
+ value: str('e.g. $25.'),
439
+ },
440
+ required: ['label', 'value'],
441
+ },
442
+ },
443
+ ref: {
444
+ type: 'object',
445
+ description: 'Where this result is in the responses.',
446
+ properties: {
447
+ callId: str('callId of the response it came from.'),
448
+ itemPath: str('JSON path of the result object inside that body: dotted keys and [index] counted from 0, e.g. entries[3] or data.events[0]; empty string for the whole body.'),
449
+ },
450
+ required: ['callId', 'itemPath'],
451
+ },
452
+ },
453
+ required: [
454
+ 'title',
455
+ 'summary',
456
+ 'imageUrl',
457
+ 'sourceUrl',
458
+ 'location',
459
+ 'recipe',
460
+ 'fields',
461
+ 'ref',
462
+ ],
463
+ },
464
+ },
465
+ },
466
+ required: ['items'],
467
+ };
468
+ const pickBestInput = {
469
+ type: 'object',
470
+ properties: {
471
+ request: str("The user's request."),
472
+ intent: intentInput,
473
+ results: {
474
+ type: 'array',
475
+ description: 'Results from every site.',
476
+ items: {
477
+ type: 'object',
478
+ properties: {
479
+ id: str('Result id; copy it into bestId.'),
480
+ siteTitle: str('Site it came from.'),
481
+ title: str('Title.'),
482
+ summary: str('Summary.'),
483
+ fields: {
484
+ type: 'array',
485
+ items: { type: 'object' },
486
+ description: 'label/value facts.',
487
+ },
488
+ },
489
+ required: ['id', 'title'],
490
+ },
491
+ },
492
+ },
493
+ required: ['request', 'intent', 'results'],
494
+ };
495
+ const pickBestOutput = {
496
+ type: 'object',
497
+ properties: {
498
+ bestId: str('id of the single best result, exactly as given.'),
499
+ reason: str('One or two sentences for the user: why this one beats the others, citing the facts that decided it.'),
500
+ },
501
+ required: ['bestId', 'reason'],
502
+ };
503
+ export const STEP_SCHEMAS = {
504
+ understand: { input: understandInput, output: understandOutput },
505
+ 'rank-sites': { input: rankInput, output: rankOutput },
506
+ prepare: { input: prepareInput, output: prepareOutput },
507
+ plan: { input: planInput, output: planOutput },
508
+ extract: { input: extractInput, output: extractOutput },
509
+ 'pick-best': { input: pickBestInput, output: pickBestOutput },
510
+ };
511
+ //# sourceMappingURL=stepSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepSchemas.js","sourceRoot":"","sources":["../../../src/business/runner/stepSchemas.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,cAAc,GAA8B;IACvD,UAAU,EAAE,mBAAmB;IAC/B,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,WAAW;CACzB,CAAC;AAEF,MAAM,GAAG,GAAG,CAAC,WAAmB,EAAE,QAAc,EAAE,EAAQ,EAAE,CAAC,CAAC;IAC5D,IAAI,EAAE,QAAQ;IACd,WAAW;IACX,GAAG,KAAK;CACT,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAS;IACrB,I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F;IACD,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;CAC3C,CAAC;AAEF,MAAM,cAAc,GAAS;IAC3B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE,GAAG,CAAC,iDAAiD,CAAC;QAC9D,MAAM,EAAE,GAAG,CACT,qGAAqG,CACtG;KACF;IACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC/B,CAAC;AAGF,MAAM,CAAC,MAAM,YAAY,GAAqD;IAC5E,UAAU,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,EAAE;IAChE,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE;IACtD,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE;IACvD,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE;IAC9C,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE;IACvD,WAAW,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE;CAC9D,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { AgentIntent, BestData, CandidateSite, FormField, GeoLocation, PrepareResponse, ResultItem } from '@sudobility/raidr_agent_types';
2
+ import type { AiTransport, SiteCatalog, SiteContextSource } from './runner';
3
+ export interface UnderstandInput {
4
+ request: string;
5
+ vocabulary?: string[];
6
+ country?: string;
7
+ locale?: string;
8
+ timeZone?: string;
9
+ now?: string;
10
+ }
11
+ export declare function understandIntent(ai: AiTransport, input: UnderstandInput): Promise<AgentIntent>;
12
+ export declare const MAX_RANKED_SITES = 12;
13
+ export interface RankSitesInput {
14
+ request: string;
15
+ intent: AgentIntent;
16
+ country?: string;
17
+ candidates: CandidateSite[];
18
+ }
19
+ export declare function rankSites(ai: AiTransport, input: RankSitesInput): Promise<CandidateSite[]>;
20
+ export declare const MAX_MERGED_FIELDS = 12;
21
+ export declare function mergeForm(fieldLists: FormField[][]): FormField[];
22
+ export interface PrepareSitesInput {
23
+ request: string;
24
+ intent: AgentIntent;
25
+ location?: GeoLocation;
26
+ sites: string[];
27
+ }
28
+ export declare const MAX_PREPARE_TOOLS = 40;
29
+ export declare function prepareSites(ai: AiTransport, catalog: SiteContextSource | SiteCatalog, input: PrepareSitesInput): Promise<PrepareResponse>;
30
+ export declare const MAX_BEST_CANDIDATES = 40;
31
+ export interface PickBestInput {
32
+ request: string;
33
+ intent: AgentIntent;
34
+ results: ResultItem[];
35
+ }
36
+ export declare function pickBest(ai: AiTransport, input: PickBestInput): Promise<BestData | null>;
37
+ //# sourceMappingURL=steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/business/runner/steps.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,aAAa,EACb,SAAS,EACT,WAAW,EACX,eAAe,EACf,UAAU,EAGX,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAc5E,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAQD,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,WAAW,CAAC,CAetB;AAOD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,MAAM,WAAW,cAAc;IAC7B,OAAO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