oft-agt 0.5.11 → 0.5.12
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/cli.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/version.mjs +1 -1
package/cli.mjs
CHANGED
|
@@ -195,7 +195,7 @@ async function start(config) {
|
|
|
195
195
|
if (message.command === 'stop') { await save(path.join(home, 'paused.json'), {}); await stopBot(); await usage.flush(send).catch(() => {}); send({ type: 'runtime-status', state: 'stopped' }); }
|
|
196
196
|
else if (message.command === 'restart') { await restartBot(config); if (await exists(path.join(home, 'paused.json'))) await unlink(path.join(home, 'paused.json')); send({ type: 'runtime-status', state: 'running' }); }
|
|
197
197
|
} catch { send({ type: 'runtime-status', state: 'failed' }); }
|
|
198
|
-
} else if(message.type==='api-tool'){try{const result=message.payload.op==='test'?await requestApi(message.payload.config,{resolveSecret:name=>readApiSecret(name,home)}):await secretOperation(home,config.agentId,message.payload);send({type:'api-result',id:message.id,
|
|
198
|
+
} else if(message.type==='api-tool'){try{const result=message.payload.op==='test'?await requestApi(message.payload.config,{resolveSecret:name=>readApiSecret(name,home)}):await secretOperation(home,config.agentId,message.payload);const encoded=Buffer.from(JSON.stringify({result})).toString('base64');if(encoded.length>560000)throw Error('Réponse trop volumineuse.');const total=Math.ceil(encoded.length/1400);for(let index=0;index<total;index++)send({type:'api-result',id:message.id,index,total,chunk:encoded.slice(index*1400,(index+1)*1400)});}catch{send({type:'api-result',id:message.id,error:'Opération API impossible. Vérifiez la requête et les secrets.'});}return;}
|
|
199
199
|
if (message.type === 'deploy') {
|
|
200
200
|
console.log(`[${new Date().toISOString()}] Nouveau déploiement reçu.`);
|
|
201
201
|
if (await exists(path.join(home, 'paused.json'))) await unlink(path.join(home, 'paused.json'));
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oft-agt",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "oft-agt",
|
|
9
|
-
"version": "0.5.
|
|
9
|
+
"version": "0.5.12",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"discord.js": "^14.14.0",
|
|
12
12
|
"ws": "^8.18.0"
|
package/package.json
CHANGED
package/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_VERSION = '0.5.
|
|
1
|
+
export const AGENT_VERSION = '0.5.12';
|