@clawos-dev/clawd 0.2.237 → 0.2.238
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/cli.cjs +17 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -50506,7 +50506,10 @@ var EXPOSED_RPC_METHODS = [
|
|
|
50506
50506
|
// 查当前 turn caller —— cc 长驻 + owner/guest 交替驱动同一 session 时不能靠启动时 env
|
|
50507
50507
|
// 写死身份,必须运行时 fetch。header X-Clawd-Session-Id 作 session 定位,handler 内查
|
|
50508
50508
|
// manager.tryGetState(sid).currentTurnSender 返 SenderInfo | null。
|
|
50509
|
-
"session.currentTurnSender"
|
|
50509
|
+
"session.currentTurnSender",
|
|
50510
|
+
// 建联交换(T-32):本机 cc 拨号前查对端 osUser 拼 `<osUser>@127.0.0.1`。窄读——handler
|
|
50511
|
+
// 只返 deviceId / displayName / osUser(无 connectToken 等敏感字段),见 handlers/contact.ts dialInfo。
|
|
50512
|
+
"contact.dialInfo"
|
|
50510
50513
|
];
|
|
50511
50514
|
async function handleRpcRequest(input) {
|
|
50512
50515
|
const { method, body, sessionId, dispatcher } = input;
|
|
@@ -55845,6 +55848,18 @@ function buildContactHandlers(deps) {
|
|
|
55845
55848
|
}
|
|
55846
55849
|
};
|
|
55847
55850
|
};
|
|
55851
|
+
const dialInfo = async () => {
|
|
55852
|
+
return {
|
|
55853
|
+
response: {
|
|
55854
|
+
type: "contact:dialInfo:ok",
|
|
55855
|
+
contacts: deps.store.list().map((c) => ({
|
|
55856
|
+
deviceId: c.deviceId,
|
|
55857
|
+
displayName: c.displayName,
|
|
55858
|
+
...c.osUser ? { osUser: c.osUser } : {}
|
|
55859
|
+
}))
|
|
55860
|
+
}
|
|
55861
|
+
};
|
|
55862
|
+
};
|
|
55848
55863
|
const pin = async (frame, _client, ctx) => {
|
|
55849
55864
|
ensureOwner(ctx);
|
|
55850
55865
|
const { type: _t, requestId: _r, ...rest } = frame;
|
|
@@ -55888,6 +55903,7 @@ function buildContactHandlers(deps) {
|
|
|
55888
55903
|
};
|
|
55889
55904
|
return {
|
|
55890
55905
|
"contact:list": list,
|
|
55906
|
+
"contact:dialInfo": dialInfo,
|
|
55891
55907
|
"contact:pin": pin,
|
|
55892
55908
|
"contact:remove": remove
|
|
55893
55909
|
};
|