awal 2.0.3 → 2.2.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/commands/address.d.ts.map +1 -1
- package/dist/commands/address.js +22 -5
- package/dist/commands/address.js.map +1 -1
- package/dist/commands/balance.d.ts.map +1 -1
- package/dist/commands/balance.js +61 -28
- package/dist/commands/balance.js.map +1 -1
- package/dist/commands/bazaar.d.ts.map +1 -1
- package/dist/commands/bazaar.js +15 -16
- package/dist/commands/bazaar.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +18 -7
- package/dist/commands/send.js.map +1 -1
- package/dist/formatters/output.d.ts +1 -1
- package/dist/formatters/output.js +3 -3
- package/dist/formatters/output.js.map +1 -1
- package/dist/utils/addressValidation.d.ts +14 -1
- package/dist/utils/addressValidation.d.ts.map +1 -1
- package/dist/utils/addressValidation.js +16 -1
- package/dist/utils/addressValidation.js.map +1 -1
- package/dist/utils/bazaarCache.d.ts +4 -0
- package/dist/utils/bazaarCache.d.ts.map +1 -1
- package/dist/utils/bazaarCache.js +136 -8
- package/dist/utils/bazaarCache.js.map +1 -1
- package/dist/utils/serverManager.js +1 -1
- package/package.json +6 -6
- package/server-bundle/bundle-electron.js +74 -11
- package/server-bundle/package.json +1 -1
- package/server-bundle/preload.js +1 -1
|
@@ -3,21 +3,30 @@ import * as path from 'path';
|
|
|
3
3
|
import * as os from 'os';
|
|
4
4
|
import { Document } from '@langchain/core/documents';
|
|
5
5
|
import { BM25Retriever } from '@langchain/community/retrievers/bm25';
|
|
6
|
-
const
|
|
7
|
-
const PAGE_LIMIT = 100;
|
|
6
|
+
const DEFAULT_PAGE_SIZE = 100;
|
|
8
7
|
const STALE_HOURS = 12;
|
|
8
|
+
const CDP_FACILITATOR = {
|
|
9
|
+
url: 'https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources',
|
|
10
|
+
pageSize: 1000,
|
|
11
|
+
};
|
|
12
|
+
const OPENX402_FACILITATOR = {
|
|
13
|
+
url: 'https://facilitator.openx402.ai/discovery/resources',
|
|
14
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
15
|
+
};
|
|
16
|
+
const FACILITATORS = [CDP_FACILITATOR, OPENX402_FACILITATOR];
|
|
9
17
|
function getCacheDir() {
|
|
10
18
|
return path.join(os.homedir(), '.config', 'awal', 'bazaar');
|
|
11
19
|
}
|
|
12
20
|
function getCachePath() {
|
|
13
21
|
return path.join(getCacheDir(), 'resources.json');
|
|
14
22
|
}
|
|
15
|
-
|
|
23
|
+
async function fetchFromFacilitator(facilitator) {
|
|
16
24
|
const all = [];
|
|
17
25
|
let offset = 0;
|
|
26
|
+
const pageSize = facilitator.pageSize || DEFAULT_PAGE_SIZE;
|
|
18
27
|
let hasMore = true;
|
|
19
28
|
while (hasMore) {
|
|
20
|
-
const url = `${
|
|
29
|
+
const url = `${facilitator.url}?limit=${pageSize}&offset=${offset}`;
|
|
21
30
|
const response = await fetch(url, {
|
|
22
31
|
headers: { Accept: 'application/json' },
|
|
23
32
|
});
|
|
@@ -25,19 +34,26 @@ export async function fetchAllResources() {
|
|
|
25
34
|
if (response.status === 429 && all.length > 0) {
|
|
26
35
|
break;
|
|
27
36
|
}
|
|
28
|
-
throw new Error(`
|
|
37
|
+
throw new Error(`Facilitator ${facilitator.url} returned ${response.status}: ${response.statusText}`);
|
|
29
38
|
}
|
|
30
39
|
const body = (await response.json());
|
|
40
|
+
for (const item of body.items) {
|
|
41
|
+
item.facilitator = facilitator.url;
|
|
42
|
+
}
|
|
31
43
|
all.push(...body.items);
|
|
32
44
|
if (all.length >= body.pagination.total) {
|
|
33
45
|
hasMore = false;
|
|
34
46
|
}
|
|
35
47
|
else {
|
|
36
|
-
offset +=
|
|
48
|
+
offset += pageSize;
|
|
37
49
|
}
|
|
38
50
|
}
|
|
39
51
|
return all;
|
|
40
52
|
}
|
|
53
|
+
export async function fetchAllResources() {
|
|
54
|
+
const results = await Promise.all(FACILITATORS.map(fetchFromFacilitator));
|
|
55
|
+
return results.flat();
|
|
56
|
+
}
|
|
41
57
|
export function loadCache() {
|
|
42
58
|
const cachePath = getCachePath();
|
|
43
59
|
if (!existsSync(cachePath)) {
|
|
@@ -106,13 +122,125 @@ function buildDocContent(r) {
|
|
|
106
122
|
}
|
|
107
123
|
return parts.join(' ');
|
|
108
124
|
}
|
|
125
|
+
const GENERIC_DESCRIPTIONS = [
|
|
126
|
+
'premium api access',
|
|
127
|
+
'api access',
|
|
128
|
+
'premium access',
|
|
129
|
+
'access api',
|
|
130
|
+
'api endpoint',
|
|
131
|
+
'premium endpoint',
|
|
132
|
+
'get data',
|
|
133
|
+
'fetch data',
|
|
134
|
+
'data api',
|
|
135
|
+
'api service',
|
|
136
|
+
'web service',
|
|
137
|
+
'web api',
|
|
138
|
+
'rest api',
|
|
139
|
+
'http api',
|
|
140
|
+
];
|
|
141
|
+
export function isGenericDescription(desc) {
|
|
142
|
+
if (!desc)
|
|
143
|
+
return true;
|
|
144
|
+
const trimmed = desc.trim();
|
|
145
|
+
if (trimmed.length < 15)
|
|
146
|
+
return true;
|
|
147
|
+
const lower = trimmed.toLowerCase();
|
|
148
|
+
return GENERIC_DESCRIPTIONS.some((g) => lower === g);
|
|
149
|
+
}
|
|
150
|
+
export function getDomainCounts(resources) {
|
|
151
|
+
const counts = new Map();
|
|
152
|
+
for (const r of resources) {
|
|
153
|
+
try {
|
|
154
|
+
const domain = new URL(r.resource).hostname;
|
|
155
|
+
counts.set(domain, (counts.get(domain) ?? 0) + 1);
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
// skip malformed URLs
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return counts;
|
|
162
|
+
}
|
|
163
|
+
export function scoreResourceQuality(resource, domainCounts) {
|
|
164
|
+
let score = 0;
|
|
165
|
+
// Output schema quality (weight: 0.30)
|
|
166
|
+
const output = resource.metadata?.output;
|
|
167
|
+
if (output && typeof output === 'object') {
|
|
168
|
+
const outputObj = output;
|
|
169
|
+
if (outputObj.output && typeof outputObj.output === 'object') {
|
|
170
|
+
const inner = outputObj.output;
|
|
171
|
+
if (inner.properties && typeof inner.properties === 'object') {
|
|
172
|
+
score += 0.3;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// Description quality (weight: 0.30)
|
|
177
|
+
const desc = resource.metadata?.description;
|
|
178
|
+
if (desc && !isGenericDescription(desc) && desc.length > 50) {
|
|
179
|
+
score += 0.3;
|
|
180
|
+
}
|
|
181
|
+
else if (desc && !isGenericDescription(desc)) {
|
|
182
|
+
// Partial credit for non-generic but short descriptions
|
|
183
|
+
score += 0.15;
|
|
184
|
+
}
|
|
185
|
+
// Domain concentration (weight: 0.20) — fewer resources = higher quality
|
|
186
|
+
try {
|
|
187
|
+
const domain = new URL(resource.resource).hostname;
|
|
188
|
+
const count = domainCounts.get(domain) ?? 0;
|
|
189
|
+
if (count < 100) {
|
|
190
|
+
score += 0.2;
|
|
191
|
+
}
|
|
192
|
+
else if (count < 1000) {
|
|
193
|
+
// Linear scale between 100 and 1000
|
|
194
|
+
score += 0.2 * (1 - (count - 100) / 900);
|
|
195
|
+
}
|
|
196
|
+
// 1000+ gets 0
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
// malformed URL gets 0
|
|
200
|
+
}
|
|
201
|
+
// HTTPS (weight: 0.10)
|
|
202
|
+
if (resource.resource.startsWith('https://')) {
|
|
203
|
+
score += 0.1;
|
|
204
|
+
}
|
|
205
|
+
// Timeout (weight: 0.10)
|
|
206
|
+
const accepts = resource.accepts;
|
|
207
|
+
if (accepts && accepts.length > 0) {
|
|
208
|
+
// Check for maxTimeoutSeconds in accepts metadata
|
|
209
|
+
const firstAccept = accepts[0];
|
|
210
|
+
const timeout = firstAccept.maxTimeoutSeconds;
|
|
211
|
+
if (timeout === undefined || timeout <= 30) {
|
|
212
|
+
score += 0.1;
|
|
213
|
+
}
|
|
214
|
+
else if (timeout < 300) {
|
|
215
|
+
// Linear scale between 30 and 300
|
|
216
|
+
score += 0.1 * (1 - (timeout - 30) / 270);
|
|
217
|
+
}
|
|
218
|
+
// 300+ gets 0
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
// No timeout info — give benefit of the doubt
|
|
222
|
+
score += 0.1;
|
|
223
|
+
}
|
|
224
|
+
return score;
|
|
225
|
+
}
|
|
109
226
|
export async function searchResources(query, resources, k = 5) {
|
|
227
|
+
const candidateK = k * 5;
|
|
110
228
|
const docs = resources.map((r) => new Document({
|
|
111
229
|
pageContent: buildDocContent(r),
|
|
112
230
|
metadata: { resource: r },
|
|
113
231
|
}));
|
|
114
|
-
const retriever = BM25Retriever.fromDocuments(docs, { k });
|
|
232
|
+
const retriever = BM25Retriever.fromDocuments(docs, { k: candidateK });
|
|
115
233
|
const results = await retriever.invoke(query);
|
|
116
|
-
|
|
234
|
+
const candidates = results.map((doc) => doc.metadata.resource);
|
|
235
|
+
const domainCounts = getDomainCounts(resources);
|
|
236
|
+
const scored = candidates.map((resource, index) => {
|
|
237
|
+
const qualityScore = scoreResourceQuality(resource, domainCounts);
|
|
238
|
+
// BM25 position score: 1.0 for first result, decreasing linearly
|
|
239
|
+
const bm25PositionScore = 1 - index / candidateK;
|
|
240
|
+
const combinedScore = 0.4 * qualityScore + 0.6 * bm25PositionScore;
|
|
241
|
+
return { resource, combinedScore };
|
|
242
|
+
});
|
|
243
|
+
scored.sort((a, b) => b.combinedScore - a.combinedScore);
|
|
244
|
+
return scored.slice(0, k).map((s) => s.resource);
|
|
117
245
|
}
|
|
118
246
|
//# sourceMappingURL=bazaarCache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bazaarCache.js","sourceRoot":"","sources":["../../src/utils/bazaarCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,KAAK,IAAI,MAAM,MA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"}
|
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'url';
|
|
|
6
6
|
import { getPrimaryProcessPid } from './processCheck.js';
|
|
7
7
|
const paths = envPaths('awal');
|
|
8
8
|
// This will be updated by the build script
|
|
9
|
-
const BUNDLE_VERSION = '2.0
|
|
9
|
+
const BUNDLE_VERSION = '2.2.0';
|
|
10
10
|
function getServerPaths() {
|
|
11
11
|
const dataDir = paths.data;
|
|
12
12
|
const bundleDir = path.join(dataDir, 'server');
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "awal",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Coinbase Wallet CLI for payments and crypto",
|
|
6
|
-
"bin":
|
|
6
|
+
"bin": {
|
|
7
|
+
"awal": "dist/index.js"
|
|
8
|
+
},
|
|
7
9
|
"files": [
|
|
8
10
|
"dist/",
|
|
9
11
|
"server-bundle/"
|
|
@@ -17,10 +19,8 @@
|
|
|
17
19
|
"format": "prettier --write src/**/*.ts"
|
|
18
20
|
},
|
|
19
21
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"@x402/core": "2.3.0",
|
|
23
|
-
"@x402/extensions": "2.3.0",
|
|
22
|
+
"@x402/core": "^2.4.0",
|
|
23
|
+
"@x402/extensions": "^2.4.0",
|
|
24
24
|
"chalk": "^5.3.0",
|
|
25
25
|
"commander": "^12.0.0",
|
|
26
26
|
"env-paths": "^3.0.0",
|