shortcutxl 0.3.82 → 0.3.83
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/BINARY-INVENTORY.json +10 -10
- package/CHANGELOG.md +4 -0
- package/dist/cli/args.js +2 -2
- package/dist/cli/runtime-launch-profile.d.ts +2 -8
- package/dist/cli/runtime-launch-profile.js +10 -13
- package/dist/cli.js +10 -11
- package/dist/rpc/rpc-host.js +3 -0
- package/native-app/main/chunks/{linux-C_fdDfT1.js → linux-BNzCbzEv.js} +6 -6
- package/native-app/main/chunks/{mac-B6uq7hmv.js → mac-Brys445r.js} +6 -6
- package/native-app/main/chunks/{photon_rs-DzyDysqa.js → photon_rs-BibpYw4G.js} +2 -2
- package/native-app/main/chunks/{setup-worker-protocol-PnJOIZVR.js → setup-worker-protocol-DkeuNPNE.js} +124 -127
- package/native-app/main/chunks/{shared-CXjreP6V.js → shared-DdhTDmUY.js} +1 -1
- package/native-app/main/index.js +89 -2868
- package/native-app/main/setup-worker.js +5 -5
- package/native-app/package.json +1 -1
- package/native-app/renderer/assets/{index-BObJc0Rl.js → index-hkPksres.js} +373 -224
- package/native-app/renderer/index.html +1 -1
- package/package.json +1 -1
- package/plugins/shortcutxl/SKILL.md +4 -2
- package/plugins/shortcutxl/skills/shortcutxl/SKILL.md +4 -2
- package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/pip-26.2.dist-info/RECORD +3 -3
- package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
- package/xll/python/Scripts/httpx.exe +0 -0
- package/xll/python/Scripts/idna.exe +0 -0
- package/xll/python/Scripts/pip.exe +0 -0
- package/xll/python/Scripts/pip3.13.exe +0 -0
- package/xll/python/Scripts/pip3.exe +0 -0
- package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
- package/xll/python/Scripts/pywin32_testall.exe +0 -0
package/BINARY-INVENTORY.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-14T08:00:44.785Z",
|
|
4
4
|
"package": "shortcutxl",
|
|
5
5
|
"build": {
|
|
6
6
|
"builder": "github-actions",
|
|
7
7
|
"repository": "lyfegame/shortcut",
|
|
8
8
|
"sourceRef": "refs/heads/fix/native-tab-lifecycle-e2e",
|
|
9
|
-
"sourceCommit": "
|
|
9
|
+
"sourceCommit": "05b4e8d19e60e7761e4839f723e34f10aec5732b",
|
|
10
10
|
"workflowRef": "lyfegame/shortcut/.github/workflows/release-shortcutxl.yml@refs/heads/fix/native-tab-lifecycle-e2e",
|
|
11
|
-
"runId": "
|
|
11
|
+
"runId": "31782090568",
|
|
12
12
|
"runnerOs": "Windows",
|
|
13
13
|
"runnerImage": "win25-vs2026",
|
|
14
14
|
"runnerImageVersion": "20260803.193.1"
|
|
@@ -534,7 +534,7 @@
|
|
|
534
534
|
},
|
|
535
535
|
{
|
|
536
536
|
"path": "xll/python/Scripts/httpx.exe",
|
|
537
|
-
"sha256": "
|
|
537
|
+
"sha256": "65250768d249e621c8d772506fb01447e82fe9ee4f886e7652d20c76257df743",
|
|
538
538
|
"source": "httpx console launcher installed into embedded Python",
|
|
539
539
|
"version": "see packaged httpx distribution",
|
|
540
540
|
"builtBy": "third-party",
|
|
@@ -542,7 +542,7 @@
|
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
544
|
"path": "xll/python/Scripts/idna.exe",
|
|
545
|
-
"sha256": "
|
|
545
|
+
"sha256": "b62b33859e93f2f5e3aec1d90810fe89f3798c4b60e52e40587b134f87268241",
|
|
546
546
|
"source": "Python package console launcher installed into embedded Python",
|
|
547
547
|
"version": "see owning Python package metadata in site-packages",
|
|
548
548
|
"builtBy": "third-party",
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
},
|
|
551
551
|
{
|
|
552
552
|
"path": "xll/python/Scripts/pip.exe",
|
|
553
|
-
"sha256": "
|
|
553
|
+
"sha256": "cdf622bf555bb3f7d192501f331010f7ef29dd70a13dcec2df8e3e160cb5626e",
|
|
554
554
|
"source": "pip console launcher installed into embedded Python",
|
|
555
555
|
"version": "see packaged pip distribution",
|
|
556
556
|
"builtBy": "third-party",
|
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
"path": "xll/python/Scripts/pip3.13.exe",
|
|
561
|
-
"sha256": "
|
|
561
|
+
"sha256": "cdf622bf555bb3f7d192501f331010f7ef29dd70a13dcec2df8e3e160cb5626e",
|
|
562
562
|
"source": "pip console launcher installed into embedded Python",
|
|
563
563
|
"version": "see packaged pip distribution",
|
|
564
564
|
"builtBy": "third-party",
|
|
@@ -566,7 +566,7 @@
|
|
|
566
566
|
},
|
|
567
567
|
{
|
|
568
568
|
"path": "xll/python/Scripts/pip3.exe",
|
|
569
|
-
"sha256": "
|
|
569
|
+
"sha256": "cdf622bf555bb3f7d192501f331010f7ef29dd70a13dcec2df8e3e160cb5626e",
|
|
570
570
|
"source": "pip console launcher installed into embedded Python",
|
|
571
571
|
"version": "see packaged pip distribution",
|
|
572
572
|
"builtBy": "third-party",
|
|
@@ -574,7 +574,7 @@
|
|
|
574
574
|
},
|
|
575
575
|
{
|
|
576
576
|
"path": "xll/python/Scripts/pywin32_postinstall.exe",
|
|
577
|
-
"sha256": "
|
|
577
|
+
"sha256": "05901aedb7c65ac48a31dede95ccc8a7daf8cef8cf923af364635310c57f2c45",
|
|
578
578
|
"source": "Python package console launcher installed into embedded Python",
|
|
579
579
|
"version": "see owning Python package metadata in site-packages",
|
|
580
580
|
"builtBy": "third-party",
|
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
"path": "xll/python/Scripts/pywin32_testall.exe",
|
|
585
|
-
"sha256": "
|
|
585
|
+
"sha256": "af7a61cb9722914d056923434850b756fda5cc388f6c9d3b47586efac880848c",
|
|
586
586
|
"source": "Python package console launcher installed into embedded Python",
|
|
587
587
|
"version": "see owning Python package metadata in site-packages",
|
|
588
588
|
"builtBy": "third-party",
|
package/CHANGELOG.md
CHANGED
package/dist/cli/args.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from '../config.js';
|
|
6
6
|
import { isValidThinkingLevel, VALID_THINKING_LEVELS } from '../core/defaults.js';
|
|
7
|
-
import { MODE,
|
|
7
|
+
import { MODE, RUNTIME_LAUNCH_MODES } from '../mode-names.js';
|
|
8
8
|
import { SHORTCUT_OPENAI_MODEL_ID } from '../model-ids.js';
|
|
9
9
|
import { isSubagentSelectableModelRef, SUBAGENT_SELECTABLE_MODEL_REFS } from '../subagent-model-policy.js';
|
|
10
10
|
/** Parse process argv into a structured Args record, supporting extension-registered flags. */
|
|
@@ -262,7 +262,7 @@ ${chalk.bold('Options:')}
|
|
|
262
262
|
--no-themes Disable theme discovery and loading
|
|
263
263
|
--export <file> Export session file to HTML and exit
|
|
264
264
|
--list-models [search] List available models (with optional fuzzy search)
|
|
265
|
-
--agent-mode <mode> Start in a specific mode: ${
|
|
265
|
+
--agent-mode <mode> Start in a specific mode: ${RUNTIME_LAUNCH_MODES.join(', ')} (default: ${MODE.ACTION})
|
|
266
266
|
--output-workbook <file> Require print-mode agent to save final workbook to file
|
|
267
267
|
--artifact-dir <dir> Require print-mode agent to save generated artifacts in dir
|
|
268
268
|
--event-log-path <file> Write print-mode AgentSessionEvent JSONL to file
|
|
@@ -4,15 +4,9 @@ export type { RuntimeLaunchMode, SelectableAgentMode } from '../mode-names.js';
|
|
|
4
4
|
export interface RuntimeLaunchProfile {
|
|
5
5
|
mode: RuntimeLaunchMode;
|
|
6
6
|
availableModes: readonly SelectableAgentMode[];
|
|
7
|
-
permissions: {
|
|
8
|
-
runtimeBypass: boolean;
|
|
9
|
-
spreadsheetAutoApprove: boolean;
|
|
10
|
-
};
|
|
11
7
|
}
|
|
12
8
|
type RuntimeLaunchArguments = Pick<Args, 'agentMode' | 'dangerouslySkipRuntimePermissions' | 'dangerouslySkipSpreadsheetPermissions'>;
|
|
13
9
|
export interface RuntimeLaunchSettings {
|
|
14
|
-
getDangerouslySkipRuntimePermissions(): boolean;
|
|
15
|
-
getSessionAutoApproveDefault(): boolean;
|
|
16
10
|
setDangerouslySkipRuntimePermissionsOverride(enabled: boolean | undefined): void;
|
|
17
11
|
setDangerouslySkipSpreadsheetPermissionsOverride(enabled: boolean | undefined): void;
|
|
18
12
|
}
|
|
@@ -22,6 +16,6 @@ export interface RuntimeLaunchSettings {
|
|
|
22
16
|
* this path so their preflight state cannot drift from actual startup.
|
|
23
17
|
*/
|
|
24
18
|
export declare function applyRuntimeLaunchArguments(settings: RuntimeLaunchSettings, args: RuntimeLaunchArguments): RuntimeLaunchProfile;
|
|
25
|
-
/** Resolves
|
|
26
|
-
export declare function resolveRuntimeLaunchProfile(
|
|
19
|
+
/** Resolves process-static launch metadata without reading mutable settings. */
|
|
20
|
+
export declare function resolveRuntimeLaunchProfile(runtimeArgs: readonly string[]): RuntimeLaunchProfile;
|
|
27
21
|
//# sourceMappingURL=runtime-launch-profile.d.ts.map
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { SettingsManager } from '../app/settings-manager.js';
|
|
2
1
|
import { resolveRuntimeLaunchMode, SELECTABLE_AGENT_MODES } from '../mode-names.js';
|
|
3
2
|
import { parseArgs } from './args.js';
|
|
3
|
+
function profileFromArguments(args) {
|
|
4
|
+
return {
|
|
5
|
+
mode: resolveRuntimeLaunchMode(args.agentMode),
|
|
6
|
+
availableModes: SELECTABLE_AGENT_MODES
|
|
7
|
+
};
|
|
8
|
+
}
|
|
4
9
|
/**
|
|
5
10
|
* Applies process-local CLI overrides and reports the state a newly started
|
|
6
11
|
* runtime will expose. The CLI entrypoint and external runtime launchers share
|
|
7
12
|
* this path so their preflight state cannot drift from actual startup.
|
|
8
13
|
*/
|
|
9
14
|
export function applyRuntimeLaunchArguments(settings, args) {
|
|
10
|
-
const mode = resolveRuntimeLaunchMode(args.agentMode);
|
|
11
15
|
settings.setDangerouslySkipRuntimePermissionsOverride(args.dangerouslySkipRuntimePermissions ? true : undefined);
|
|
12
16
|
settings.setDangerouslySkipSpreadsheetPermissionsOverride(args.dangerouslySkipSpreadsheetPermissions ? true : undefined);
|
|
13
|
-
return
|
|
14
|
-
mode,
|
|
15
|
-
availableModes: SELECTABLE_AGENT_MODES,
|
|
16
|
-
permissions: {
|
|
17
|
-
runtimeBypass: settings.getDangerouslySkipRuntimePermissions(),
|
|
18
|
-
spreadsheetAutoApprove: settings.getSessionAutoApproveDefault()
|
|
19
|
-
}
|
|
20
|
-
};
|
|
17
|
+
return profileFromArguments(args);
|
|
21
18
|
}
|
|
22
|
-
/** Resolves
|
|
23
|
-
export function resolveRuntimeLaunchProfile(
|
|
24
|
-
return
|
|
19
|
+
/** Resolves process-static launch metadata without reading mutable settings. */
|
|
20
|
+
export function resolveRuntimeLaunchProfile(runtimeArgs) {
|
|
21
|
+
return profileFromArguments(parseArgs([...runtimeArgs]));
|
|
25
22
|
}
|
|
26
23
|
//# sourceMappingURL=runtime-launch-profile.js.map
|
package/dist/cli.js
CHANGED
|
@@ -461330,7 +461330,7 @@ ${source_default.bold("Options:")}
|
|
|
461330
461330
|
--no-themes Disable theme discovery and loading
|
|
461331
461331
|
--export <file> Export session file to HTML and exit
|
|
461332
461332
|
--list-models [search] List available models (with optional fuzzy search)
|
|
461333
|
-
--agent-mode <mode> Start in a specific mode: ${
|
|
461333
|
+
--agent-mode <mode> Start in a specific mode: ${RUNTIME_LAUNCH_MODES.join(", ")} (default: ${MODE.ACTION})
|
|
461334
461334
|
--output-workbook <file> Require print-mode agent to save final workbook to file
|
|
461335
461335
|
--artifact-dir <dir> Require print-mode agent to save generated artifacts in dir
|
|
461336
461336
|
--event-log-path <file> Write print-mode AgentSessionEvent JSONL to file
|
|
@@ -463263,27 +463263,24 @@ var init_platform_api_commands = __esm({
|
|
|
463263
463263
|
});
|
|
463264
463264
|
|
|
463265
463265
|
// src/cli/runtime-launch-profile.ts
|
|
463266
|
+
function profileFromArguments(args) {
|
|
463267
|
+
return {
|
|
463268
|
+
mode: resolveRuntimeLaunchMode(args.agentMode),
|
|
463269
|
+
availableModes: SELECTABLE_AGENT_MODES
|
|
463270
|
+
};
|
|
463271
|
+
}
|
|
463266
463272
|
function applyRuntimeLaunchArguments(settings, args) {
|
|
463267
|
-
const mode = resolveRuntimeLaunchMode(args.agentMode);
|
|
463268
463273
|
settings.setDangerouslySkipRuntimePermissionsOverride(
|
|
463269
463274
|
args.dangerouslySkipRuntimePermissions ? true : void 0
|
|
463270
463275
|
);
|
|
463271
463276
|
settings.setDangerouslySkipSpreadsheetPermissionsOverride(
|
|
463272
463277
|
args.dangerouslySkipSpreadsheetPermissions ? true : void 0
|
|
463273
463278
|
);
|
|
463274
|
-
return
|
|
463275
|
-
mode,
|
|
463276
|
-
availableModes: SELECTABLE_AGENT_MODES,
|
|
463277
|
-
permissions: {
|
|
463278
|
-
runtimeBypass: settings.getDangerouslySkipRuntimePermissions(),
|
|
463279
|
-
spreadsheetAutoApprove: settings.getSessionAutoApproveDefault()
|
|
463280
|
-
}
|
|
463281
|
-
};
|
|
463279
|
+
return profileFromArguments(args);
|
|
463282
463280
|
}
|
|
463283
463281
|
var init_runtime_launch_profile = __esm({
|
|
463284
463282
|
"src/cli/runtime-launch-profile.ts"() {
|
|
463285
463283
|
"use strict";
|
|
463286
|
-
init_settings_manager();
|
|
463287
463284
|
init_mode_names();
|
|
463288
463285
|
init_args();
|
|
463289
463286
|
}
|
|
@@ -542563,6 +542560,7 @@ var init_rpc_host = __esm({
|
|
|
542563
542560
|
"src/rpc/rpc-host.ts"() {
|
|
542564
542561
|
"use strict";
|
|
542565
542562
|
init_oauth();
|
|
542563
|
+
init_types8();
|
|
542566
542564
|
init_slash_commands();
|
|
542567
542565
|
init_file_uploads();
|
|
542568
542566
|
init_config2();
|
|
@@ -542648,6 +542646,7 @@ var init_rpc_host = __esm({
|
|
|
542648
542646
|
return;
|
|
542649
542647
|
}
|
|
542650
542648
|
this.publish({ type: "interaction_resolved", interactionId: event.approval.id });
|
|
542649
|
+
if (event.choice === APPROVAL.ACCEPT_ALL) this.publishSnapshot();
|
|
542651
542650
|
});
|
|
542652
542651
|
this.unsubscribeSession = this.session.subscribe((event) => {
|
|
542653
542652
|
this.publish({ type: "session_event", event });
|
package/dist/rpc/rpc-host.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as crypto from 'node:crypto';
|
|
|
3
3
|
import { existsSync, readdirSync } from 'node:fs';
|
|
4
4
|
import { unlink } from 'node:fs/promises';
|
|
5
5
|
import { getOAuthProviders } from '../ai/utils/oauth/index.js';
|
|
6
|
+
import { APPROVAL } from '../app/approvals/types.js';
|
|
6
7
|
import { getBuiltinSlashCommands } from '../app/extensions/slash-commands.js';
|
|
7
8
|
import { appendAttachedFiles } from '../app/file-uploads.js';
|
|
8
9
|
import { getMcpConfigPath } from '../app/mcp/config.js';
|
|
@@ -94,6 +95,8 @@ export class RpcSessionHost {
|
|
|
94
95
|
return;
|
|
95
96
|
}
|
|
96
97
|
this.publish({ type: 'interaction_resolved', interactionId: event.approval.id });
|
|
98
|
+
if (event.choice === APPROVAL.ACCEPT_ALL)
|
|
99
|
+
this.publishSnapshot();
|
|
97
100
|
});
|
|
98
101
|
this.unsubscribeSession = this.session.subscribe((event) => {
|
|
99
102
|
this.publish({ type: 'session_event', event });
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { existsSync } from "fs";
|
|
2
|
-
import { e as ensureUv$1 } from "./shared-
|
|
3
|
-
import { a, b, c, s } from "./shared-
|
|
2
|
+
import { e as ensureUv$1 } from "./shared-DdhTDmUY.js";
|
|
3
|
+
import { a, b, c, s } from "./shared-DdhTDmUY.js";
|
|
4
4
|
import { h as header, o as ok, l as log } from "../setup-worker.js";
|
|
5
5
|
import "path";
|
|
6
|
-
import "./setup-worker-protocol-
|
|
7
|
-
import "crypto";
|
|
8
|
-
import "os";
|
|
9
|
-
import "url";
|
|
6
|
+
import "./setup-worker-protocol-DkeuNPNE.js";
|
|
10
7
|
import "node:process";
|
|
11
8
|
import "node:os";
|
|
12
9
|
import "node:tty";
|
|
10
|
+
import "crypto";
|
|
11
|
+
import "os";
|
|
12
|
+
import "url";
|
|
13
13
|
import "node:crypto";
|
|
14
14
|
import "node:fs";
|
|
15
15
|
import "child_process";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { existsSync } from "fs";
|
|
2
|
-
import { e as ensureUv$1 } from "./shared-
|
|
3
|
-
import { a, b, c, s } from "./shared-
|
|
2
|
+
import { e as ensureUv$1 } from "./shared-DdhTDmUY.js";
|
|
3
|
+
import { a, b, c, s } from "./shared-DdhTDmUY.js";
|
|
4
4
|
import { h as header, o as ok, l as log } from "../setup-worker.js";
|
|
5
5
|
import "path";
|
|
6
|
-
import "./setup-worker-protocol-
|
|
7
|
-
import "crypto";
|
|
8
|
-
import "os";
|
|
9
|
-
import "url";
|
|
6
|
+
import "./setup-worker-protocol-DkeuNPNE.js";
|
|
10
7
|
import "node:process";
|
|
11
8
|
import "node:os";
|
|
12
9
|
import "node:tty";
|
|
10
|
+
import "crypto";
|
|
11
|
+
import "os";
|
|
12
|
+
import "url";
|
|
13
13
|
import "node:crypto";
|
|
14
14
|
import "node:fs";
|
|
15
15
|
import "child_process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "../index.js";
|
|
2
|
-
import require$$
|
|
2
|
+
import require$$1 from "util";
|
|
3
3
|
import path__default from "path";
|
|
4
4
|
import require$$0 from "fs";
|
|
5
5
|
import __cjs_mod__ from "node:module";
|
|
@@ -35,7 +35,7 @@ function requirePhoton_rs() {
|
|
|
35
35
|
let imports = {};
|
|
36
36
|
imports["__wbindgen_placeholder__"] = module.exports;
|
|
37
37
|
let wasm;
|
|
38
|
-
const { TextEncoder, TextDecoder } = require$$
|
|
38
|
+
const { TextEncoder, TextDecoder } = require$$1;
|
|
39
39
|
function debugString(val) {
|
|
40
40
|
const type = typeof val;
|
|
41
41
|
if (type == "number" || type == "boolean" || val == null) {
|
|
@@ -1,137 +1,15 @@
|
|
|
1
|
+
import process$1 from "node:process";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import tty from "node:tty";
|
|
1
4
|
import "crypto";
|
|
2
5
|
import { readFileSync, existsSync } from "fs";
|
|
3
6
|
import { homedir } from "os";
|
|
4
7
|
import { dirname, join } from "path";
|
|
5
8
|
import { fileURLToPath } from "url";
|
|
6
|
-
import process$1 from "node:process";
|
|
7
|
-
import os from "node:os";
|
|
8
|
-
import tty from "node:tty";
|
|
9
9
|
import __cjs_mod__ from "node:module";
|
|
10
10
|
const __filename = import.meta.filename;
|
|
11
11
|
const __dirname = import.meta.dirname;
|
|
12
12
|
const require2 = __cjs_mod__.createRequire(import.meta.url);
|
|
13
|
-
const __filename$1 = fileURLToPath(import.meta.url);
|
|
14
|
-
const __dirname$1 = dirname(__filename$1);
|
|
15
|
-
function detectInstallMethod() {
|
|
16
|
-
const resolvedPath = `${__dirname$1}\0${process.execPath || ""}`.toLowerCase();
|
|
17
|
-
if (resolvedPath.includes("/pnpm/") || resolvedPath.includes("/.pnpm/") || resolvedPath.includes("\\pnpm\\")) {
|
|
18
|
-
return "pnpm";
|
|
19
|
-
}
|
|
20
|
-
if (resolvedPath.includes("/yarn/") || resolvedPath.includes("/.yarn/") || resolvedPath.includes("\\yarn\\")) {
|
|
21
|
-
return "yarn";
|
|
22
|
-
}
|
|
23
|
-
if (resolvedPath.includes("/npm/") || resolvedPath.includes("/node_modules/") || resolvedPath.includes("\\npm\\")) {
|
|
24
|
-
return "npm";
|
|
25
|
-
}
|
|
26
|
-
return "unknown";
|
|
27
|
-
}
|
|
28
|
-
function getUpdateInstruction(packageName) {
|
|
29
|
-
const method = detectInstallMethod();
|
|
30
|
-
switch (method) {
|
|
31
|
-
case "pnpm":
|
|
32
|
-
return `Run: pnpm add -g ${packageName}`;
|
|
33
|
-
case "yarn":
|
|
34
|
-
return `Run: yarn global add ${packageName}`;
|
|
35
|
-
case "npm":
|
|
36
|
-
return `Run: npm install -g ${packageName}`;
|
|
37
|
-
default:
|
|
38
|
-
return `Run: npm install -g ${packageName}`;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function getUpdateCommand(packageName) {
|
|
42
|
-
const command = getUpdateLaunchCommand(packageName);
|
|
43
|
-
return [command.executable, ...command.args].join(" ");
|
|
44
|
-
}
|
|
45
|
-
function getUpdateLaunchCommand(packageName) {
|
|
46
|
-
switch (detectInstallMethod()) {
|
|
47
|
-
case "pnpm":
|
|
48
|
-
return { executable: "pnpm", args: ["add", "-g", packageName] };
|
|
49
|
-
case "yarn":
|
|
50
|
-
return { executable: "yarn", args: ["global", "add", packageName] };
|
|
51
|
-
case "npm":
|
|
52
|
-
default:
|
|
53
|
-
return { executable: "npm", args: ["install", "-g", packageName] };
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function getPackageDir() {
|
|
57
|
-
const envDir = process.env.SHORTCUT_PACKAGE_DIR;
|
|
58
|
-
if (envDir) {
|
|
59
|
-
if (envDir === "~")
|
|
60
|
-
return homedir();
|
|
61
|
-
if (envDir.startsWith("~/"))
|
|
62
|
-
return homedir() + envDir.slice(1);
|
|
63
|
-
return envDir;
|
|
64
|
-
}
|
|
65
|
-
let dir = __dirname$1;
|
|
66
|
-
while (dir !== dirname(dir)) {
|
|
67
|
-
if (existsSync(join(dir, "package.json"))) {
|
|
68
|
-
return dir;
|
|
69
|
-
}
|
|
70
|
-
dir = dirname(dir);
|
|
71
|
-
}
|
|
72
|
-
return __dirname$1;
|
|
73
|
-
}
|
|
74
|
-
function isSourceCheckout() {
|
|
75
|
-
return process.env.SHORTCUT_FORCE_SOURCE_CHECKOUT === "1";
|
|
76
|
-
}
|
|
77
|
-
function getPackageJsonPath() {
|
|
78
|
-
return join(getPackageDir(), "package.json");
|
|
79
|
-
}
|
|
80
|
-
const pkg = JSON.parse(readFileSync(getPackageJsonPath(), "utf-8"));
|
|
81
|
-
const APP_NAME = pkg.shortcutConfig?.name || "shortcut";
|
|
82
|
-
const CONFIG_DIR_NAME = pkg.shortcutConfig?.configDir || ".shortcut";
|
|
83
|
-
const VERSION = pkg.version;
|
|
84
|
-
const NPM_PACKAGE_NAME = "shortcutxl";
|
|
85
|
-
const ENV_AGENT_DIR = `${APP_NAME.toUpperCase()}_CODING_AGENT_DIR`;
|
|
86
|
-
const DEFAULT_SANDBOX_NETWORK = "proxy";
|
|
87
|
-
const NPM_REGISTRY_URL = process.env.SHORTCUT_NPM_REGISTRY_URL?.trim() || `https://registry.npmjs.org/${NPM_PACKAGE_NAME}/latest`;
|
|
88
|
-
function getAgentDir() {
|
|
89
|
-
const envDir = process.env[ENV_AGENT_DIR];
|
|
90
|
-
if (envDir) {
|
|
91
|
-
if (envDir === "~")
|
|
92
|
-
return homedir();
|
|
93
|
-
if (envDir.startsWith("~/"))
|
|
94
|
-
return homedir() + envDir.slice(1);
|
|
95
|
-
return envDir;
|
|
96
|
-
}
|
|
97
|
-
return join(homedir(), CONFIG_DIR_NAME, "agent");
|
|
98
|
-
}
|
|
99
|
-
function getStableXllDir() {
|
|
100
|
-
return join(getAgentDir(), "xll");
|
|
101
|
-
}
|
|
102
|
-
function getSettingsPath() {
|
|
103
|
-
return join(getAgentDir(), "settings.json");
|
|
104
|
-
}
|
|
105
|
-
function getUpdateCachePath() {
|
|
106
|
-
return join(getAgentDir(), "update.json");
|
|
107
|
-
}
|
|
108
|
-
function getBinDir() {
|
|
109
|
-
return join(getAgentDir(), "bin");
|
|
110
|
-
}
|
|
111
|
-
function getInstalledMarkerPath() {
|
|
112
|
-
return join(getAgentDir(), ".installed");
|
|
113
|
-
}
|
|
114
|
-
function isInstalled() {
|
|
115
|
-
return existsSync(getInstalledMarkerPath());
|
|
116
|
-
}
|
|
117
|
-
function getXllPath() {
|
|
118
|
-
return join(getAgentDir(), "xll", "ShortcutXL.xll");
|
|
119
|
-
}
|
|
120
|
-
function getEmbeddedPythonDir() {
|
|
121
|
-
return join(getAgentDir(), "xll", "python");
|
|
122
|
-
}
|
|
123
|
-
function getEmbeddedPythonExe() {
|
|
124
|
-
return join(getEmbeddedPythonDir(), "python.exe");
|
|
125
|
-
}
|
|
126
|
-
function getUvBinPath() {
|
|
127
|
-
return join(getAgentDir(), "bin", "uv");
|
|
128
|
-
}
|
|
129
|
-
function getUvPythonDir() {
|
|
130
|
-
return join(getAgentDir(), "uv");
|
|
131
|
-
}
|
|
132
|
-
function getUvVenvDir() {
|
|
133
|
-
return join(getUvPythonDir(), "venv");
|
|
134
|
-
}
|
|
135
13
|
const ANSI_BACKGROUND_OFFSET = 10;
|
|
136
14
|
const wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
137
15
|
const wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -613,6 +491,127 @@ const applyStyle = (self, string) => {
|
|
|
613
491
|
Object.defineProperties(createChalk.prototype, styles);
|
|
614
492
|
const chalk = createChalk();
|
|
615
493
|
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
494
|
+
const __filename$1 = fileURLToPath(import.meta.url);
|
|
495
|
+
const __dirname$1 = dirname(__filename$1);
|
|
496
|
+
function detectInstallMethod() {
|
|
497
|
+
const resolvedPath = `${__dirname$1}\0${process.execPath || ""}`.toLowerCase();
|
|
498
|
+
if (resolvedPath.includes("/pnpm/") || resolvedPath.includes("/.pnpm/") || resolvedPath.includes("\\pnpm\\")) {
|
|
499
|
+
return "pnpm";
|
|
500
|
+
}
|
|
501
|
+
if (resolvedPath.includes("/yarn/") || resolvedPath.includes("/.yarn/") || resolvedPath.includes("\\yarn\\")) {
|
|
502
|
+
return "yarn";
|
|
503
|
+
}
|
|
504
|
+
if (resolvedPath.includes("/npm/") || resolvedPath.includes("/node_modules/") || resolvedPath.includes("\\npm\\")) {
|
|
505
|
+
return "npm";
|
|
506
|
+
}
|
|
507
|
+
return "unknown";
|
|
508
|
+
}
|
|
509
|
+
function getUpdateInstruction(packageName) {
|
|
510
|
+
const method = detectInstallMethod();
|
|
511
|
+
switch (method) {
|
|
512
|
+
case "pnpm":
|
|
513
|
+
return `Run: pnpm add -g ${packageName}`;
|
|
514
|
+
case "yarn":
|
|
515
|
+
return `Run: yarn global add ${packageName}`;
|
|
516
|
+
case "npm":
|
|
517
|
+
return `Run: npm install -g ${packageName}`;
|
|
518
|
+
default:
|
|
519
|
+
return `Run: npm install -g ${packageName}`;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
function getUpdateCommand(packageName) {
|
|
523
|
+
const command = getUpdateLaunchCommand(packageName);
|
|
524
|
+
return [command.executable, ...command.args].join(" ");
|
|
525
|
+
}
|
|
526
|
+
function getUpdateLaunchCommand(packageName) {
|
|
527
|
+
switch (detectInstallMethod()) {
|
|
528
|
+
case "pnpm":
|
|
529
|
+
return { executable: "pnpm", args: ["add", "-g", packageName] };
|
|
530
|
+
case "yarn":
|
|
531
|
+
return { executable: "yarn", args: ["global", "add", packageName] };
|
|
532
|
+
case "npm":
|
|
533
|
+
default:
|
|
534
|
+
return { executable: "npm", args: ["install", "-g", packageName] };
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function getPackageDir() {
|
|
538
|
+
const envDir = process.env.SHORTCUT_PACKAGE_DIR;
|
|
539
|
+
if (envDir) {
|
|
540
|
+
if (envDir === "~")
|
|
541
|
+
return homedir();
|
|
542
|
+
if (envDir.startsWith("~/"))
|
|
543
|
+
return homedir() + envDir.slice(1);
|
|
544
|
+
return envDir;
|
|
545
|
+
}
|
|
546
|
+
let dir = __dirname$1;
|
|
547
|
+
while (dir !== dirname(dir)) {
|
|
548
|
+
if (existsSync(join(dir, "package.json"))) {
|
|
549
|
+
return dir;
|
|
550
|
+
}
|
|
551
|
+
dir = dirname(dir);
|
|
552
|
+
}
|
|
553
|
+
return __dirname$1;
|
|
554
|
+
}
|
|
555
|
+
function isSourceCheckout() {
|
|
556
|
+
return process.env.SHORTCUT_FORCE_SOURCE_CHECKOUT === "1";
|
|
557
|
+
}
|
|
558
|
+
function getPackageJsonPath() {
|
|
559
|
+
return join(getPackageDir(), "package.json");
|
|
560
|
+
}
|
|
561
|
+
const pkg = JSON.parse(readFileSync(getPackageJsonPath(), "utf-8"));
|
|
562
|
+
const APP_NAME = pkg.shortcutConfig?.name || "shortcut";
|
|
563
|
+
const CONFIG_DIR_NAME = pkg.shortcutConfig?.configDir || ".shortcut";
|
|
564
|
+
const VERSION = pkg.version;
|
|
565
|
+
const NPM_PACKAGE_NAME = "shortcutxl";
|
|
566
|
+
const ENV_AGENT_DIR = `${APP_NAME.toUpperCase()}_CODING_AGENT_DIR`;
|
|
567
|
+
const NPM_REGISTRY_URL = process.env.SHORTCUT_NPM_REGISTRY_URL?.trim() || `https://registry.npmjs.org/${NPM_PACKAGE_NAME}/latest`;
|
|
568
|
+
function getAgentDir() {
|
|
569
|
+
const envDir = process.env[ENV_AGENT_DIR];
|
|
570
|
+
if (envDir) {
|
|
571
|
+
if (envDir === "~")
|
|
572
|
+
return homedir();
|
|
573
|
+
if (envDir.startsWith("~/"))
|
|
574
|
+
return homedir() + envDir.slice(1);
|
|
575
|
+
return envDir;
|
|
576
|
+
}
|
|
577
|
+
return join(homedir(), CONFIG_DIR_NAME, "agent");
|
|
578
|
+
}
|
|
579
|
+
function getStableXllDir() {
|
|
580
|
+
return join(getAgentDir(), "xll");
|
|
581
|
+
}
|
|
582
|
+
function getSettingsPath() {
|
|
583
|
+
return join(getAgentDir(), "settings.json");
|
|
584
|
+
}
|
|
585
|
+
function getUpdateCachePath() {
|
|
586
|
+
return join(getAgentDir(), "update.json");
|
|
587
|
+
}
|
|
588
|
+
function getBinDir() {
|
|
589
|
+
return join(getAgentDir(), "bin");
|
|
590
|
+
}
|
|
591
|
+
function getInstalledMarkerPath() {
|
|
592
|
+
return join(getAgentDir(), ".installed");
|
|
593
|
+
}
|
|
594
|
+
function isInstalled() {
|
|
595
|
+
return existsSync(getInstalledMarkerPath());
|
|
596
|
+
}
|
|
597
|
+
function getXllPath() {
|
|
598
|
+
return join(getAgentDir(), "xll", "ShortcutXL.xll");
|
|
599
|
+
}
|
|
600
|
+
function getEmbeddedPythonDir() {
|
|
601
|
+
return join(getAgentDir(), "xll", "python");
|
|
602
|
+
}
|
|
603
|
+
function getEmbeddedPythonExe() {
|
|
604
|
+
return join(getEmbeddedPythonDir(), "python.exe");
|
|
605
|
+
}
|
|
606
|
+
function getUvBinPath() {
|
|
607
|
+
return join(getAgentDir(), "bin", "uv");
|
|
608
|
+
}
|
|
609
|
+
function getUvPythonDir() {
|
|
610
|
+
return join(getAgentDir(), "uv");
|
|
611
|
+
}
|
|
612
|
+
function getUvVenvDir() {
|
|
613
|
+
return join(getUvPythonDir(), "venv");
|
|
614
|
+
}
|
|
616
615
|
function isSetupWorkerMessage(value) {
|
|
617
616
|
if (!value || typeof value !== "object") return false;
|
|
618
617
|
const message = value;
|
|
@@ -634,8 +633,6 @@ function isSetupWorkerResponse(value) {
|
|
|
634
633
|
}
|
|
635
634
|
export {
|
|
636
635
|
APP_NAME as A,
|
|
637
|
-
CONFIG_DIR_NAME as C,
|
|
638
|
-
DEFAULT_SANDBOX_NETWORK as D,
|
|
639
636
|
NPM_PACKAGE_NAME as N,
|
|
640
637
|
VERSION as V,
|
|
641
638
|
getUpdateCachePath as a,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync, chmodSync } from "fs";
|
|
2
2
|
import { join, dirname } from "path";
|
|
3
|
-
import { q as getSettingsPath, r as getUvBinPath, s as getUvVenvDir, V as VERSION, t as getUvPythonDir } from "./setup-worker-protocol-
|
|
3
|
+
import { q as getSettingsPath, r as getUvBinPath, s as getUvVenvDir, V as VERSION, t as getUvPythonDir } from "./setup-worker-protocol-DkeuNPNE.js";
|
|
4
4
|
import { h as header, o as ok, l as log, n as note, r as runWithProgress, a as run } from "../setup-worker.js";
|
|
5
5
|
const ACTIVE_ENV = "prod";
|
|
6
6
|
const ENV = {
|