@ai-workbench/connect 0.7.53-rc.2 → 0.7.53-rc.4
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/README.md +1 -1
- package/helper/remote-login.cjs +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 远程主机连接插件(L)
|
|
2
2
|
|
|
3
|
-
`@ai-workbench/connect` 0.7.53-rc.
|
|
3
|
+
`@ai-workbench/connect` 0.7.53-rc.4,随总包 `@ai-workbench/workbench-toolbridge` 0.4.4-rc.3 安装(员工不单独安装)。公开接口见 [contracts/connect-api.md](contracts/connect-api.md),员工首次设置见 [docs/CONNECT-SETUP.md](docs/CONNECT-SETUP.md)。
|
|
4
4
|
|
|
5
5
|
## 做什么
|
|
6
6
|
|
package/helper/remote-login.cjs
CHANGED
|
@@ -5,7 +5,8 @@ const [provider,graceText,...extra]=process.argv.slice(1);const grace=Number(gra
|
|
|
5
5
|
let seat,seatEnv;try{seat=require('/usr/local/aw-host/lib/agent-seats.cjs').getSeat(provider);seatEnv=require('/usr/local/aw-host/lib/agent-seats.cjs').seatEnvironment(provider);}catch{process.exit(2);}
|
|
6
6
|
if(!seat||!Number.isSafeInteger(grace)||grace<0||grace>2147483647||extra.length)process.exit(2);
|
|
7
7
|
let child,stopping=false,killTimer,codeSent=false,finished=false;
|
|
8
|
-
|
|
8
|
+
// Official CLI 2.1.330 shortens sign-in links by default; retain the full URL for PKCE/state validation.
|
|
9
|
+
const env={...seatEnv,BROWSER:'true',...(seat.provider==='claude'?{CLAUDE_CODE_FULL_SIGN_IN_LINK:'1'}:{})};
|
|
9
10
|
const input=createInterface({input:process.stdin});
|
|
10
11
|
function signalGroup(signal){if(child?.pid)try{process.kill(-child.pid,signal);}catch(e){if(e.code!=='ESRCH')process.exitCode=1;}}
|
|
11
12
|
function stop(){if(stopping||finished)return;stopping=true;signalGroup('SIGTERM');if(grace===0)signalGroup('SIGKILL');else killTimer=setTimeout(()=>signalGroup('SIGKILL'),grace);}
|