@csdwd/ai-teams-agent 0.3.5 → 0.3.6
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/index.js +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1057,7 +1057,12 @@ function connect(state, getMainTask, getQueueTask, onMessage) {
|
|
|
1057
1057
|
console.error(`[agent:${EMPLOYEE_ID}] invalid server message`, error);
|
|
1058
1058
|
}
|
|
1059
1059
|
});
|
|
1060
|
-
state.socket.on("close", () => {
|
|
1060
|
+
state.socket.on("close", (code, reason) => {
|
|
1061
|
+
if (code === 1008) {
|
|
1062
|
+
console.error(`[agent:${EMPLOYEE_ID}] \u8BA4\u8BC1\u5931\u8D25\uFF1AToken \u65E0\u6548\u6216\u670D\u52A1\u5668\u62D2\u7EDD\u8FDE\u63A5\u3002${reason ? ` (${reason})` : ""}`);
|
|
1063
|
+
console.error(`[agent:${EMPLOYEE_ID}] \u8BF7\u68C0\u67E5 AI_TEAMS_AUTH_TOKEN \u914D\u7F6E\u540E\u91CD\u65B0\u542F\u52A8\u3002`);
|
|
1064
|
+
process.exit(1);
|
|
1065
|
+
}
|
|
1061
1066
|
console.log(`[agent:${EMPLOYEE_ID}] disconnected, reconnecting in ${RECONNECT_MS}ms...`);
|
|
1062
1067
|
scheduleReconnect(state, () => connect(state, getMainTask, getQueueTask, onMessage));
|
|
1063
1068
|
});
|
|
@@ -1280,7 +1285,7 @@ if (isCli) {
|
|
|
1280
1285
|
getArgValue2 = getArgValue, resolveWorkspace3 = resolveWorkspace2, resolveAgentDir2 = resolveAgentDir, resolvePidFile2 = resolvePidFile, resolveLogDir2 = resolveLogDir, applyCliArgsToEnv2 = applyCliArgsToEnv;
|
|
1281
1286
|
const args = process.argv.slice(2);
|
|
1282
1287
|
if (args.includes("--version") || args.includes("-v")) {
|
|
1283
|
-
console.log("0.3.
|
|
1288
|
+
console.log("0.3.6");
|
|
1284
1289
|
process.exit(0);
|
|
1285
1290
|
}
|
|
1286
1291
|
if (args.includes("--help") || args.includes("-h")) {
|