@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.
- package/dist/business/index.d.ts +1 -0
- package/dist/business/index.d.ts.map +1 -1
- package/dist/business/index.js +1 -0
- package/dist/business/index.js.map +1 -1
- package/dist/business/runner/directConnector.d.ts +29 -0
- package/dist/business/runner/directConnector.d.ts.map +1 -0
- package/dist/business/runner/directConnector.js +76 -0
- package/dist/business/runner/directConnector.js.map +1 -0
- package/dist/business/runner/ids.d.ts +2 -0
- package/dist/business/runner/ids.d.ts.map +1 -0
- package/dist/business/runner/ids.js +16 -0
- package/dist/business/runner/ids.js.map +1 -0
- package/dist/business/runner/index.d.ts +9 -0
- package/dist/business/runner/index.d.ts.map +1 -0
- package/dist/business/runner/index.js +9 -0
- package/dist/business/runner/index.js.map +1 -0
- package/dist/business/runner/pageUrl.d.ts +9 -0
- package/dist/business/runner/pageUrl.d.ts.map +1 -0
- package/dist/business/runner/pageUrl.js +172 -0
- package/dist/business/runner/pageUrl.js.map +1 -0
- package/dist/business/runner/recorder.d.ts +14 -0
- package/dist/business/runner/recorder.d.ts.map +1 -0
- package/dist/business/runner/recorder.js +68 -0
- package/dist/business/runner/recorder.js.map +1 -0
- package/dist/business/runner/runner.d.ts +72 -0
- package/dist/business/runner/runner.d.ts.map +1 -0
- package/dist/business/runner/runner.js +340 -0
- package/dist/business/runner/runner.js.map +1 -0
- package/dist/business/runner/schemas.d.ts +159 -0
- package/dist/business/runner/schemas.d.ts.map +1 -0
- package/dist/business/runner/schemas.js +415 -0
- package/dist/business/runner/schemas.js.map +1 -0
- package/dist/business/runner/stepSchemas.d.ts +9 -0
- package/dist/business/runner/stepSchemas.d.ts.map +1 -0
- package/dist/business/runner/stepSchemas.js +511 -0
- package/dist/business/runner/stepSchemas.js.map +1 -0
- package/dist/business/runner/steps.d.ts +37 -0
- package/dist/business/runner/steps.d.ts.map +1 -0
- package/dist/business/runner/steps.js +197 -0
- package/dist/business/runner/steps.js.map +1 -0
- package/package.json +21 -6
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { loadSiteContext, rankTools } from './runner';
|
|
2
|
+
import { MAX_PREPARED_TOOLS, pickBestSchema, prepareSchema, rankSitesSchema, toAgentIntent, } from './schemas';
|
|
3
|
+
export async function understandIntent(ai, input) {
|
|
4
|
+
const request = input.request.trim();
|
|
5
|
+
const output = await ai.invoke('understand', {
|
|
6
|
+
request,
|
|
7
|
+
...(input.vocabulary ? { vocabulary: input.vocabulary } : {}),
|
|
8
|
+
...(input.country ? { country: input.country } : {}),
|
|
9
|
+
...(input.locale ? { locale: input.locale } : {}),
|
|
10
|
+
...(input.timeZone ? { timeZone: input.timeZone } : {}),
|
|
11
|
+
...(input.now ? { now: input.now } : {}),
|
|
12
|
+
});
|
|
13
|
+
try {
|
|
14
|
+
return toAgentIntent(output, request);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
throw new Error('The model did not understand the request');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export const MAX_RANKED_SITES = 12;
|
|
21
|
+
export async function rankSites(ai, input) {
|
|
22
|
+
if (input.candidates.length === 0)
|
|
23
|
+
return [];
|
|
24
|
+
const byHost = new Map(input.candidates.map(c => [c.apiHost, c]));
|
|
25
|
+
const output = await ai.invoke('rank-sites', {
|
|
26
|
+
request: input.request,
|
|
27
|
+
intent: input.intent,
|
|
28
|
+
...(input.country ? { country: input.country } : {}),
|
|
29
|
+
sites: input.candidates.map(c => ({
|
|
30
|
+
apiHost: c.apiHost,
|
|
31
|
+
title: c.title,
|
|
32
|
+
description: c.description,
|
|
33
|
+
labels: c.labels,
|
|
34
|
+
toolCount: c.toolCount,
|
|
35
|
+
})),
|
|
36
|
+
});
|
|
37
|
+
const parsed = rankSitesSchema.safeParse(output);
|
|
38
|
+
if (!parsed.success)
|
|
39
|
+
return input.candidates.slice(0, MAX_RANKED_SITES);
|
|
40
|
+
const seen = new Set();
|
|
41
|
+
const ranked = [];
|
|
42
|
+
for (const { apiHost, reason } of parsed.data.sites) {
|
|
43
|
+
const site = byHost.get(apiHost);
|
|
44
|
+
if (!site || seen.has(apiHost))
|
|
45
|
+
continue;
|
|
46
|
+
seen.add(apiHost);
|
|
47
|
+
ranked.push(reason ? { ...site, reason } : site);
|
|
48
|
+
if (ranked.length >= MAX_RANKED_SITES)
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
return ranked;
|
|
52
|
+
}
|
|
53
|
+
export const MAX_MERGED_FIELDS = 12;
|
|
54
|
+
export function mergeForm(fieldLists) {
|
|
55
|
+
const merged = [];
|
|
56
|
+
const byName = new Map();
|
|
57
|
+
for (const fields of fieldLists) {
|
|
58
|
+
for (const field of fields) {
|
|
59
|
+
const existing = byName.get(field.name);
|
|
60
|
+
if (!existing) {
|
|
61
|
+
if (merged.length >= MAX_MERGED_FIELDS)
|
|
62
|
+
continue;
|
|
63
|
+
const copy = {
|
|
64
|
+
...field,
|
|
65
|
+
...(field.options ? { options: [...field.options] } : {}),
|
|
66
|
+
};
|
|
67
|
+
byName.set(field.name, copy);
|
|
68
|
+
merged.push(copy);
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (field.required)
|
|
72
|
+
existing.required = true;
|
|
73
|
+
if (existing.options && field.options) {
|
|
74
|
+
for (const option of field.options) {
|
|
75
|
+
if (!existing.options.some(o => o.value === option.value))
|
|
76
|
+
existing.options.push(option);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return merged;
|
|
82
|
+
}
|
|
83
|
+
export const MAX_PREPARE_TOOLS = 40;
|
|
84
|
+
export async function prepareSites(ai, catalog, input) {
|
|
85
|
+
const hosts = [...new Set(input.sites)];
|
|
86
|
+
const plans = new Array(hosts.length);
|
|
87
|
+
const queue = hosts.map((apiHost, index) => ({ apiHost, index }));
|
|
88
|
+
const worker = async () => {
|
|
89
|
+
for (let next = queue.shift(); next; next = queue.shift()) {
|
|
90
|
+
plans[next.index] = await prepareSite(ai, catalog, input, next.apiHost);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
await Promise.all(Array.from({ length: Math.min(4, hosts.length) }, worker));
|
|
94
|
+
return {
|
|
95
|
+
sites: plans.map(p => p.plan),
|
|
96
|
+
form: mergeForm(plans.filter(p => !p.plan.unsupported).map(p => p.fields)),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
async function prepareSite(ai, catalog, input, apiHost) {
|
|
100
|
+
let context;
|
|
101
|
+
try {
|
|
102
|
+
context = await loadSiteContext(catalog, apiHost);
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return {
|
|
106
|
+
plan: {
|
|
107
|
+
apiHost,
|
|
108
|
+
title: apiHost,
|
|
109
|
+
tools: [],
|
|
110
|
+
login: 'none',
|
|
111
|
+
unsupported: 'This site could not be loaded',
|
|
112
|
+
},
|
|
113
|
+
fields: [],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const { manifest, toolAuth } = context;
|
|
117
|
+
const ranked = rankTools(manifest.tools, `${input.request} ${input.intent.query}`).slice(0, MAX_PREPARE_TOOLS);
|
|
118
|
+
const auth = (name) => toolAuth[name] ?? 'unknown';
|
|
119
|
+
const output = await ai.invoke('prepare', {
|
|
120
|
+
request: input.request,
|
|
121
|
+
intent: input.intent,
|
|
122
|
+
...(input.intent.location_needed && input.location
|
|
123
|
+
? { location: input.location }
|
|
124
|
+
: {}),
|
|
125
|
+
site: {
|
|
126
|
+
apiHost,
|
|
127
|
+
title: manifest.title,
|
|
128
|
+
description: manifest.description,
|
|
129
|
+
},
|
|
130
|
+
tools: ranked.map(t => ({
|
|
131
|
+
name: t.name,
|
|
132
|
+
description: t.description,
|
|
133
|
+
inputSchema: t.inputSchema,
|
|
134
|
+
auth: auth(t.name),
|
|
135
|
+
})),
|
|
136
|
+
});
|
|
137
|
+
const known = new Set(manifest.tools.map(t => t.name));
|
|
138
|
+
const parsed = prepareSchema.safeParse(output);
|
|
139
|
+
const noCredential = manifest.auth.style === 'none';
|
|
140
|
+
if (!parsed.success) {
|
|
141
|
+
const tools = ranked.slice(0, 3).map(t => t.name);
|
|
142
|
+
const login = !noCredential && tools.some(t => auth(t) === 'user')
|
|
143
|
+
? 'fallback'
|
|
144
|
+
: 'none';
|
|
145
|
+
return {
|
|
146
|
+
plan: { apiHost, title: manifest.title, tools, login },
|
|
147
|
+
fields: [],
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const answer = parsed.data;
|
|
151
|
+
let tools = [...new Set(answer.tools.filter(t => known.has(t)))].slice(0, MAX_PREPARED_TOOLS);
|
|
152
|
+
if (tools.length === 0)
|
|
153
|
+
tools = ranked.slice(0, 3).map(t => t.name);
|
|
154
|
+
const login = noCredential ? 'none' : answer.login;
|
|
155
|
+
const plan = {
|
|
156
|
+
apiHost,
|
|
157
|
+
title: manifest.title,
|
|
158
|
+
tools,
|
|
159
|
+
login,
|
|
160
|
+
...(login !== 'none' && answer.loginReason
|
|
161
|
+
? { loginReason: answer.loginReason }
|
|
162
|
+
: {}),
|
|
163
|
+
...(answer.unsupported ? { unsupported: answer.unsupported } : {}),
|
|
164
|
+
};
|
|
165
|
+
return { plan, fields: answer.unsupported ? [] : answer.fields };
|
|
166
|
+
}
|
|
167
|
+
export const MAX_BEST_CANDIDATES = 40;
|
|
168
|
+
export async function pickBest(ai, input) {
|
|
169
|
+
const first = input.results[0];
|
|
170
|
+
if (!first)
|
|
171
|
+
return null;
|
|
172
|
+
if (input.results.length === 1)
|
|
173
|
+
return { resultId: first.id, reason: '' };
|
|
174
|
+
const shown = input.results.slice(0, MAX_BEST_CANDIDATES);
|
|
175
|
+
let output;
|
|
176
|
+
try {
|
|
177
|
+
output = await ai.invoke('pick-best', {
|
|
178
|
+
request: input.request,
|
|
179
|
+
intent: input.intent,
|
|
180
|
+
results: shown.map(r => ({
|
|
181
|
+
id: r.id,
|
|
182
|
+
siteTitle: r.siteTitle,
|
|
183
|
+
title: r.title,
|
|
184
|
+
summary: r.summary,
|
|
185
|
+
fields: r.fields,
|
|
186
|
+
})),
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
return { resultId: first.id, reason: '' };
|
|
191
|
+
}
|
|
192
|
+
const parsed = pickBestSchema.safeParse(output);
|
|
193
|
+
if (!parsed.success || !shown.some(r => r.id === parsed.data.bestId))
|
|
194
|
+
return { resultId: first.id, reason: '' };
|
|
195
|
+
return { resultId: parsed.data.bestId, reason: parsed.data.reason };
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/business/runner/steps.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,GACd,MAAM,WAAW,CAAC;AAsBnB,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,EAAe,EACf,KAAsB;IAEtB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE;QAC3C,OAAO;QACP,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE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AAO;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACvB,EAAE,EAAE,CAAC,CAAC,EAAE;gBACR,SAAS,EAAE,CAAC,CAAC,SAAS;gBACtB,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,MAAM,EAAE,CAAC,CAAC,MAAM;aACjB,CAAC,CAAC;SACJ,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC5C,CAAC;IACD,MAAM,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QAClE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;AACtE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/raidr_agent_lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Business logic library for RaidrAgent with Zustand stores",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./runner": {
|
|
15
|
+
"types": "./dist/business/runner/index.d.ts",
|
|
16
|
+
"import": "./dist/business/runner/index.js",
|
|
17
|
+
"default": "./dist/business/runner/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
8
21
|
"publishConfig": {
|
|
9
22
|
"access": "public"
|
|
10
23
|
},
|
|
@@ -35,17 +48,18 @@
|
|
|
35
48
|
"author": "Sudobility",
|
|
36
49
|
"license": "BUSL-1.1",
|
|
37
50
|
"peerDependencies": {
|
|
38
|
-
"@sudobility/raidr_agent_client": "^0.0.
|
|
39
|
-
"@sudobility/raidr_agent_types": "^0.0.
|
|
51
|
+
"@sudobility/raidr_agent_client": "^0.0.5",
|
|
52
|
+
"@sudobility/raidr_agent_types": "^0.0.5",
|
|
40
53
|
"@sudobility/types": "^1.9.68",
|
|
41
54
|
"@tanstack/react-query": ">=5.0.0",
|
|
42
55
|
"react": ">=18.0.0",
|
|
56
|
+
"zod": "^4.0.0",
|
|
43
57
|
"zustand": ">=5.0.0"
|
|
44
58
|
},
|
|
45
59
|
"devDependencies": {
|
|
46
60
|
"@eslint/js": "^9.38.0",
|
|
47
|
-
"@sudobility/raidr_agent_client": "^0.0.
|
|
48
|
-
"@sudobility/raidr_agent_types": "^0.0.
|
|
61
|
+
"@sudobility/raidr_agent_client": "^0.0.5",
|
|
62
|
+
"@sudobility/raidr_agent_types": "^0.0.5",
|
|
49
63
|
"@sudobility/types": "^1.9.68",
|
|
50
64
|
"@tanstack/react-query": "^5.90.5",
|
|
51
65
|
"@testing-library/react": "^16.3.2",
|
|
@@ -64,6 +78,7 @@
|
|
|
64
78
|
"react-dom": "^19.2.4",
|
|
65
79
|
"typescript": "~5.9.3",
|
|
66
80
|
"vitest": "^4.0.15",
|
|
81
|
+
"zod": "^4.4.3",
|
|
67
82
|
"zustand": "^5.0.8"
|
|
68
83
|
},
|
|
69
84
|
"repository": {
|
|
@@ -75,6 +90,6 @@
|
|
|
75
90
|
"url": "https://github.com/johnqh/raidr_agent_lib/issues"
|
|
76
91
|
},
|
|
77
92
|
"dependencies": {
|
|
78
|
-
"@sudobility/raidr_types": "^0.1.
|
|
93
|
+
"@sudobility/raidr_types": "^0.1.14"
|
|
79
94
|
}
|
|
80
95
|
}
|