@cjhyy/code-shell-server 0.9.16 → 0.9.17
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.
|
@@ -34,6 +34,8 @@ export interface PanelAppProcessServiceOptions {
|
|
|
34
34
|
}): Promise<boolean>;
|
|
35
35
|
isExecutionApproved?(scope: PanelProcessApprovalScope): Promise<boolean>;
|
|
36
36
|
rememberExecutionApproval?(scope: PanelProcessApprovalScope): Promise<void>;
|
|
37
|
+
/** Desktop can use installed-app process permission and trusted-project binding as consent. */
|
|
38
|
+
allowAuthorizedProcessWithoutPrompt?: boolean;
|
|
37
39
|
/** Resolve a declared entry in this app revision; return a canonical, reviewed file. */
|
|
38
40
|
resolvePackageEntry?(owner: PanelProcessOwner, name: string): Promise<{
|
|
39
41
|
path: string;
|
|
@@ -426,7 +426,10 @@ export class PanelAppProcessService {
|
|
|
426
426
|
const guestScoped = this.options.approvalScope === "guest";
|
|
427
427
|
const approvalKey = (guestScoped ? `${owner.guestId}\0${epoch}\0` : "") +
|
|
428
428
|
`${scope.appId}\0${scope.revision}\0${scope.executablePath}\0${scope.executableFingerprint}`;
|
|
429
|
-
|
|
429
|
+
// Desktop already checks installed-app process permission and a trusted,
|
|
430
|
+
// bound project in authorize(). Web keeps its per-guest confirmation path.
|
|
431
|
+
let approved = this.options.allowAuthorizedProcessWithoutPrompt === true ||
|
|
432
|
+
this.approvedExecutables.has(approvalKey);
|
|
430
433
|
if (!approved && !guestScoped && this.options.isExecutionApproved) {
|
|
431
434
|
approved = await this.options.isExecutionApproved(scope).catch(() => false);
|
|
432
435
|
await this.authorize(owner, epoch);
|
|
@@ -475,7 +478,8 @@ export class PanelAppProcessService {
|
|
|
475
478
|
this.directoryPath(owner, grant.directoryHandle) !== grant.path)
|
|
476
479
|
throw new Error("sealed directory argument was replaced");
|
|
477
480
|
}
|
|
478
|
-
this.
|
|
481
|
+
if (!this.options.allowAuthorizedProcessWithoutPrompt)
|
|
482
|
+
this.approvedExecutables.add(approvalKey);
|
|
479
483
|
const processId = randomUUID();
|
|
480
484
|
const child = spawn(executable.path, args, {
|
|
481
485
|
cwd,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cjhyy/code-shell-server",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "CodeShell server transport layer — mobile remote HTTP/WS host, pairing, passcode gate, tunnel, rooms, uploads, and session/attachment services. Electron-free; precursor of the auth gateway.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@cjhyy/code-shell-capability-coding": "0.9.
|
|
55
|
-
"@cjhyy/code-shell-core": "0.9.
|
|
56
|
-
"@cjhyy/code-shell-web": "0.9.
|
|
54
|
+
"@cjhyy/code-shell-capability-coding": "0.9.17",
|
|
55
|
+
"@cjhyy/code-shell-core": "0.9.17",
|
|
56
|
+
"@cjhyy/code-shell-web": "0.9.17",
|
|
57
57
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
58
58
|
"@types/ws": "^8.18.1",
|
|
59
59
|
"ws": "^8.21.0",
|
|
60
|
-
"@cjhyy/code-shell-link": "0.9.
|
|
60
|
+
"@cjhyy/code-shell-link": "0.9.17"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=20.10"
|