@clawos-dev/clawd 0.2.150-beta.317.7e7a222 → 0.2.150

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 +35 -7
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -35558,34 +35558,41 @@ var fs9 = __toESM(require("fs"), 1);
35558
35558
  var path11 = __toESM(require("path"), 1);
35559
35559
  var import_node_url = require("url");
35560
35560
  var import_meta = {};
35561
+ var DEFAULT_BYPASS_PROFILE = {
35562
+ permissions: { defaultMode: "bypassPermissions" }
35563
+ };
35561
35564
  var DEFAULT_PERSONAS = [
35562
35565
  {
35563
35566
  personaId: "persona-researcher",
35564
35567
  label: "\u8C03\u7814\u5458",
35565
35568
  model: "opus",
35566
35569
  iconKey: "research",
35567
- public: false
35570
+ public: false,
35571
+ sandboxProfile: DEFAULT_BYPASS_PROFILE
35568
35572
  },
35569
35573
  {
35570
35574
  personaId: "persona-knowledge-base",
35571
35575
  label: "\u77E5\u8BC6\u5E93\u7BA1\u7406\u5458",
35572
35576
  model: "opus",
35573
35577
  iconKey: "reading",
35574
- public: false
35578
+ public: false,
35579
+ sandboxProfile: DEFAULT_BYPASS_PROFILE
35575
35580
  },
35576
35581
  {
35577
35582
  personaId: "persona-clawd-helper",
35578
35583
  label: "clawd\u4F7F\u7528\u52A9\u624B",
35579
35584
  model: "opus",
35580
35585
  iconKey: "assist",
35581
- public: false
35586
+ public: false,
35587
+ sandboxProfile: DEFAULT_BYPASS_PROFILE
35582
35588
  },
35583
35589
  {
35584
35590
  personaId: "persona-feishu-assistant",
35585
35591
  label: "\u98DE\u4E66\u52A9\u7406",
35586
35592
  model: "opus",
35587
35593
  iconKey: "assist",
35588
- public: false
35594
+ public: false,
35595
+ sandboxProfile: DEFAULT_BYPASS_PROFILE
35589
35596
  },
35590
35597
  {
35591
35598
  // app-builder:全栈应用搭建师,绑 extension-kit 模板 + multi-project picker
@@ -35669,14 +35676,16 @@ var DEFAULT_PERSONAS = [
35669
35676
  label: "\u5F00\u53D1\u8005",
35670
35677
  model: "opus",
35671
35678
  iconKey: "code",
35672
- public: false
35679
+ public: false,
35680
+ sandboxProfile: DEFAULT_BYPASS_PROFILE
35673
35681
  },
35674
35682
  {
35675
35683
  personaId: "persona-bug-fixer",
35676
35684
  label: "Bug \u4FEE\u590D\u5E08",
35677
35685
  model: "opus",
35678
35686
  iconKey: "debug",
35679
- public: false
35687
+ public: false,
35688
+ sandboxProfile: DEFAULT_BYPASS_PROFILE
35680
35689
  },
35681
35690
  {
35682
35691
  // HTML PPT 制作师:把想法/文字/旧 PPT 转成单文件 HTML 演示稿
@@ -42975,6 +42984,7 @@ function buildFeishuAuthHandlers(deps) {
42975
42984
  const logout = async () => {
42976
42985
  deps.ownerIdentityStore.clear();
42977
42986
  deps.serverKeyStore.clear();
42987
+ deps.onLogout();
42978
42988
  return {
42979
42989
  response: { type: "auth:logout:ok" }
42980
42990
  };
@@ -46535,7 +46545,25 @@ async function startDaemon(config) {
46535
46545
  bundleCache,
46536
46546
  // 飞书统一身份 Phase 1:登录 RPC handlers(auth:login:start / getIdentity / logout)
46537
46547
  // deviceId(决策 #15):getIdentity 返回给 UI 拼"我的设备标识"
46538
- feishuAuth: { loginFlow, ownerIdentityStore, deviceId: authFile.deviceId, serverKeyStore },
46548
+ feishuAuth: {
46549
+ loginFlow,
46550
+ ownerIdentityStore,
46551
+ deviceId: authFile.deviceId,
46552
+ serverKeyStore,
46553
+ // 退出登录:登录(feishuLogin.handleLoginCallback)在进程内设置的身份状态的对称逆操作。
46554
+ // 核心是 feishuActive 翻 false——否则 dispatcher 飞书 gate(下方 feishuActive 判定,每帧
46555
+ // 现读 let binding)退登后仍放行 gated 方法。一并把归属人重置回未登录初值 + 重建 handlers
46556
+ // (deps 持 ownerId/displayName 值快照,whoami/出站自报身份用),与登录置位三件套对称。
46557
+ // 不踢连:踢连是登录热切换换身份 ctx 的需要;退登只是降级,gate 每帧现读即时生效,
46558
+ // 既有连接继续用,避免改动连接生命周期 / wire 契约。
46559
+ onLogout: () => {
46560
+ feishuActive = false;
46561
+ ownerId = "";
46562
+ ownerProvider = "";
46563
+ ownerDisplayName = loadOwnerDisplayName(config.dataDir);
46564
+ handlers = makeHandlers();
46565
+ }
46566
+ },
46539
46567
  // 设备目录 + 连接(决策 #15:daemon 代理中心 server)。
46540
46568
  // exchange/listDevices 包掉 owner ttcJwt(每次现读 store——热切换后立即用新身份);
46541
46569
  // 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.150-beta.317.7e7a222",
3
+ "version": "0.2.150",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",