beast-agent 2.36.0 → 2.36.2
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/package.json +1 -3
- package/src/agent/store.js +19 -16
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beast-agent",
|
|
3
3
|
"productName": "Beast Agent",
|
|
4
|
-
"version": "2.36.
|
|
4
|
+
"version": "2.36.2",
|
|
5
5
|
"description": "Ultra-fast local agent shell for Windows.",
|
|
6
6
|
"author": "algokodcom (AlgoKod)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,8 +40,6 @@
|
|
|
40
40
|
"dist": "electron-builder --win nsis portable",
|
|
41
41
|
"test": "node --test \"tests/**/*.test.js\"",
|
|
42
42
|
"release": "node scripts/release.js",
|
|
43
|
-
"skillsweb:sync": "node skillsweb/sync-builtins.js",
|
|
44
|
-
"skillsweb:deploy": "node skillsweb/sync-builtins.js && cd skillsweb && firebase deploy --only hosting:skills",
|
|
45
43
|
"postinstall": "node scripts/fix-electron.js --soft",
|
|
46
44
|
"prepublishOnly": "node scripts/swap-electron.js deps",
|
|
47
45
|
"postpublish": "node scripts/swap-electron.js devdeps"
|
package/src/agent/store.js
CHANGED
|
@@ -15,9 +15,10 @@ const crypto = require('crypto');
|
|
|
15
15
|
const { beastRoot } = require('./memory');
|
|
16
16
|
const skills = require('./skills');
|
|
17
17
|
|
|
18
|
-
const SITE_URL = 'https://
|
|
19
|
-
const
|
|
20
|
-
const
|
|
18
|
+
const SITE_URL = 'https://skills.algokod.com';
|
|
19
|
+
const SITE_FALLBACK_URL = 'https://beastagent-skills.web.app';
|
|
20
|
+
const SITE_COMMUNITY_URLS = [SITE_URL + '/community.json', SITE_FALLBACK_URL + '/community.json'];
|
|
21
|
+
const SITE_BUILTINS_URLS = [SITE_URL + '/builtins.json', SITE_FALLBACK_URL + '/builtins.json'];
|
|
21
22
|
const COMMUNITY_URL = 'https://raw.githubusercontent.com/algokodcom/beast-agent/main/store/skills.json';
|
|
22
23
|
const MAX_FILES = 20;
|
|
23
24
|
const MAX_FILE_BYTES = 200 * 1024;
|
|
@@ -111,10 +112,10 @@ async function fetchJson(url, timeoutMs = 6000) {
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
/* Topluluk indeksi: önce SİTE (
|
|
115
|
+
/* Topluluk indeksi: önce SİTE (skills.algokod.com), sonra web.app yedeği, sonra GitHub raw */
|
|
115
116
|
async function fetchCommunity(timeoutMs = 6000) {
|
|
116
117
|
if (memo.community && Date.now() - memo.communityAt < MEMO_MS) return memo.community;
|
|
117
|
-
for (const url of [
|
|
118
|
+
for (const url of [...SITE_COMMUNITY_URLS, COMMUNITY_URL]) {
|
|
118
119
|
try {
|
|
119
120
|
const j = await fetchJson(url, timeoutMs);
|
|
120
121
|
if (j && Array.isArray(j.skills)) {
|
|
@@ -135,17 +136,19 @@ async function fetchCommunity(timeoutMs = 6000) {
|
|
|
135
136
|
/* Yerleşik skill vitrini: sitedeki builtins.json (offline'da diske cache) */
|
|
136
137
|
async function fetchBuiltins(timeoutMs = 6000) {
|
|
137
138
|
if (memo.builtins && Date.now() - memo.builtinsAt < MEMO_MS) return memo.builtins;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
for (const url of SITE_BUILTINS_URLS) {
|
|
140
|
+
try {
|
|
141
|
+
const j = await fetchJson(url, timeoutMs);
|
|
142
|
+
if (j && Array.isArray(j.skills)) {
|
|
143
|
+
try {
|
|
144
|
+
writeJson(builtinsCacheFile(), j);
|
|
145
|
+
} catch {}
|
|
146
|
+
memo.builtins = j.skills;
|
|
147
|
+
memo.builtinsAt = Date.now();
|
|
148
|
+
return j.skills;
|
|
149
|
+
}
|
|
150
|
+
} catch {}
|
|
151
|
+
}
|
|
149
152
|
const cached = readJson(builtinsCacheFile(), { skills: [] });
|
|
150
153
|
return Array.isArray(cached.skills) ? cached.skills : [];
|
|
151
154
|
}
|