@clawos-dev/clawd 0.2.147 → 0.2.148

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +20 -1
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -42946,6 +42946,7 @@ function buildFeishuAuthHandlers(deps) {
42946
42946
  const logout = async () => {
42947
42947
  deps.ownerIdentityStore.clear();
42948
42948
  deps.serverKeyStore.clear();
42949
+ deps.onLogout();
42949
42950
  return {
42950
42951
  response: { type: "auth:logout:ok" }
42951
42952
  };
@@ -46506,7 +46507,25 @@ async function startDaemon(config) {
46506
46507
  bundleCache,
46507
46508
  // 飞书统一身份 Phase 1:登录 RPC handlers(auth:login:start / getIdentity / logout)
46508
46509
  // deviceId(决策 #15):getIdentity 返回给 UI 拼"我的设备标识"
46509
- feishuAuth: { loginFlow, ownerIdentityStore, deviceId: authFile.deviceId, serverKeyStore },
46510
+ feishuAuth: {
46511
+ loginFlow,
46512
+ ownerIdentityStore,
46513
+ deviceId: authFile.deviceId,
46514
+ serverKeyStore,
46515
+ // 退出登录:登录(feishuLogin.handleLoginCallback)在进程内设置的身份状态的对称逆操作。
46516
+ // 核心是 feishuActive 翻 false——否则 dispatcher 飞书 gate(下方 feishuActive 判定,每帧
46517
+ // 现读 let binding)退登后仍放行 gated 方法。一并把归属人重置回未登录初值 + 重建 handlers
46518
+ // (deps 持 ownerId/displayName 值快照,whoami/出站自报身份用),与登录置位三件套对称。
46519
+ // 不踢连:踢连是登录热切换换身份 ctx 的需要;退登只是降级,gate 每帧现读即时生效,
46520
+ // 既有连接继续用,避免改动连接生命周期 / wire 契约。
46521
+ onLogout: () => {
46522
+ feishuActive = false;
46523
+ ownerId = "";
46524
+ ownerProvider = "";
46525
+ ownerDisplayName = loadOwnerDisplayName(config.dataDir);
46526
+ handlers = makeHandlers();
46527
+ }
46528
+ },
46510
46529
  // 设备目录 + 连接(决策 #15:daemon 代理中心 server)。
46511
46530
  // exchange/listDevices 包掉 owner ttcJwt(每次现读 store——热切换后立即用新身份);
46512
46531
  // dispatcher 的 FEISHU_GATED_METHODS gate 已保证未登录时这些 RPC 到不了 handler,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.147",
3
+ "version": "0.2.148",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",