|
|
@@ -1,11 +1,9 @@
|
|
|
// Copyright (c) 未来飞马
|
|
|
//
|
|
|
-// This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
-// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
-// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
+// MIT License — Copyright (c) 2026 Fmode (未来飞马)
|
|
|
//
|
|
|
// Trademark Notice:
|
|
|
-// The MPL-2.0 license grants copyright permissions for source code only.
|
|
|
+// The MIT license grants copyright permissions for source code only.
|
|
|
// It does NOT grant any rights to use trademarks including "未来飞马",
|
|
|
// "Harness Loop", "RSI", and associated slogan "让AI进化提前发生,让AI落地快人一步".
|
|
|
// Any use of these trademarks requires separate written permission.
|
|
|
@@ -48,6 +46,11 @@ export function resolveIdentity() {
|
|
|
readJson(`${home}/.fmode/config/user.json`)?.sessionToken ||
|
|
|
readJson(`${home}/.fmode/config.json`)?.sessionToken ||
|
|
|
readJson('./.fmode/config.json')?.sessionToken ||
|
|
|
+ // ⚠️ 兜底:容器普遍有 /opt/data/fmode-identity.json(开通时写入),
|
|
|
+ // 而 ~/.fmode/config.json 不一定有。放在最后不改变既有优先级。
|
|
|
+ // 实测 34 台容器中 32 台只有 fmode-identity.json 带 session_token。
|
|
|
+ readJson('/opt/data/fmode-identity.json')?.session_token ||
|
|
|
+ readJson(`${home}/.fmode-harness-agent/fmode-identity.json`)?.session_token ||
|
|
|
null;
|
|
|
|
|
|
const agentId =
|