@buzzni/saycode-cli 0.7.2 → 0.7.3
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/channel-extension-host.mjs +11 -2
- package/index.mjs +124 -33
- package/package.json +1 -1
|
@@ -3,6 +3,10 @@ import { createInterface } from "node:readline";
|
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { resolve, sep } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
|
+
const ASSET_PERMISSIONS = ["assets.read", "assets.write", "files.select", "drafts.prepare"];
|
|
7
|
+
function usesAssetWorkflow(permissions) {
|
|
8
|
+
return permissions.some((permission) => ASSET_PERMISSIONS.includes(permission));
|
|
9
|
+
}
|
|
6
10
|
const EXTENSION_ARTIFACT_ACTION_OPERATIONS = ["publishPublic"];
|
|
7
11
|
const EXTENSION_ARTIFACT_SOURCE_TYPES = ["project-file", "personal-chat-file"];
|
|
8
12
|
const ID_PATTERN$2 = /^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/;
|
|
@@ -225,6 +229,10 @@ function parseExtensionChannelContributions(value) {
|
|
|
225
229
|
});
|
|
226
230
|
}
|
|
227
231
|
const EXTENSION_PERMISSIONS = [
|
|
232
|
+
"assets.read",
|
|
233
|
+
"assets.write",
|
|
234
|
+
"files.select",
|
|
235
|
+
"drafts.prepare",
|
|
228
236
|
"projects.read",
|
|
229
237
|
"remoteFiles.read",
|
|
230
238
|
"remoteFiles.write",
|
|
@@ -254,7 +262,7 @@ const EXTENSION_PERMISSIONS = [
|
|
|
254
262
|
const SAYCODE_EXTENSION_API_VERSION = 3;
|
|
255
263
|
const SAYCODE_EXTENSION_MINIMUM_API_VERSION = 2;
|
|
256
264
|
const MAX_EXTENSION_API_WINDOW_WIDTH = 2;
|
|
257
|
-
const SAYCODE_EXTENSION_ENGINE_VERSION = "1.
|
|
265
|
+
const SAYCODE_EXTENSION_ENGINE_VERSION = "1.1.0";
|
|
258
266
|
const SAYCODE_CHANNEL_API_VERSION = CHANNEL_API_VERSION;
|
|
259
267
|
const SAYCODE_CHANNEL_MINIMUM_API_VERSION = CHANNEL_MINIMUM_API_VERSION;
|
|
260
268
|
class UnsupportedChannelApiVersionError extends Error {
|
|
@@ -284,7 +292,7 @@ const V2_PERMISSIONS = /* @__PURE__ */ new Set([
|
|
|
284
292
|
"browserViewer.install",
|
|
285
293
|
"browserViewer.installChrome"
|
|
286
294
|
]);
|
|
287
|
-
const V3_PERMISSIONS = /* @__PURE__ */ new Set(["artifacts.publishPublic"]);
|
|
295
|
+
const V3_PERMISSIONS = /* @__PURE__ */ new Set(["artifacts.publishPublic", "assets.read", "assets.write", "files.select", "drafts.prepare"]);
|
|
288
296
|
const CHANNEL_PERMISSIONS = /* @__PURE__ */ new Set([
|
|
289
297
|
"channels.receive",
|
|
290
298
|
"channels.ack",
|
|
@@ -1284,6 +1292,7 @@ async function startExtensionHost(deps) {
|
|
|
1284
1292
|
});
|
|
1285
1293
|
const runtime = new ExtensionHostRuntime({
|
|
1286
1294
|
manifest,
|
|
1295
|
+
requestTimeoutMs: usesAssetWorkflow(manifest.permissions) ? 13e4 : void 0,
|
|
1287
1296
|
loadModule: (entrypoint) => deps.importModule(protocolUrl(deps.extensionId, entrypoint)),
|
|
1288
1297
|
send: (message) => deps.bridge.send(message)
|
|
1289
1298
|
});
|
package/index.mjs
CHANGED
|
@@ -23,6 +23,7 @@ import { execFile, spawn } from "node:child_process";
|
|
|
23
23
|
import { randomUUID, createPublicKey, verify, createHash, randomBytes } from "node:crypto";
|
|
24
24
|
import { fileURLToPath } from "node:url";
|
|
25
25
|
import { createRequire } from "node:module";
|
|
26
|
+
import net from "node:net";
|
|
26
27
|
import { Transform } from "node:stream";
|
|
27
28
|
import { pipeline } from "node:stream/promises";
|
|
28
29
|
import { promisify } from "node:util";
|
|
@@ -45,7 +46,7 @@ function _mergeNamespaces(n, m) {
|
|
|
45
46
|
}
|
|
46
47
|
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
47
48
|
}
|
|
48
|
-
const version$2 = "0.7.
|
|
49
|
+
const version$2 = "0.7.3";
|
|
49
50
|
const manifest = {
|
|
50
51
|
version: version$2
|
|
51
52
|
};
|
|
@@ -365,7 +366,7 @@ const usageEntryKo = {
|
|
|
365
366
|
"onboarding.autoWait.organization": "등록할 조직을 선택하면 이어서 진행합니다.",
|
|
366
367
|
"onboarding.autoWait.identity": "이 컴퓨터의 조직·유형·사용자 연결 확인을 기다리고 있습니다.",
|
|
367
368
|
"onboarding.autoWait.machine": "먼저 이 컴퓨터 등록 단계에서 연결을 완료하세요.",
|
|
368
|
-
"onboarding.autoWait.login": "
|
|
369
|
+
"onboarding.autoWait.login": "로그인한 뒤 등록 완료를 누르거나, 개인 계정 없이 진행하려면 등록 안 함을 선택하세요.",
|
|
369
370
|
"onboarding.autoWait.platform": "이 플랫폼의 AI 인증 확인은 아직 지원되지 않습니다.",
|
|
370
371
|
"onboarding.autoWait.verification": "설치 후 AI 도구의 실행 상태를 다시 확인하고 있습니다.",
|
|
371
372
|
"onboarding.autoWait.cli": "먼저 Saycode CLI 단계에서 도구 준비를 완료하세요.",
|
|
@@ -472,8 +473,8 @@ const workAreaKo = {
|
|
|
472
473
|
const redesignKo = {
|
|
473
474
|
...sessionShareKo,
|
|
474
475
|
...workAreaKo,
|
|
475
|
-
"ux2.pinnedConversations": "
|
|
476
|
-
"ux2.pinnedProjects": "
|
|
476
|
+
"ux2.pinnedConversations": "고정된 대화",
|
|
477
|
+
"ux2.pinnedProjects": "고정된 프로젝트",
|
|
477
478
|
"ux2.selectOrganization": "조직 선택",
|
|
478
479
|
"ux2.selectMachine": "머신 선택",
|
|
479
480
|
"ux2.expandTools": "펼치기",
|
|
@@ -1363,7 +1364,10 @@ const githubTriggersKo = {
|
|
|
1363
1364
|
"githubTriggers.validationRequired": "이름과 템플릿을 입력하세요."
|
|
1364
1365
|
};
|
|
1365
1366
|
const memoryHubKo = {
|
|
1366
|
-
"memoryHub.button": "메모리",
|
|
1367
|
+
"memoryHub.button": "프로젝트 메모리",
|
|
1368
|
+
"memoryHub.manageButton": "프로젝트 메모리 관리",
|
|
1369
|
+
"workspaceMenu.conversationProject": "대화 및 프로젝트",
|
|
1370
|
+
"workspaceMenu.statusResources": "상태 및 리소스",
|
|
1367
1371
|
"memoryHub.ariaLabel": "메모리 허브",
|
|
1368
1372
|
"memoryHub.title": "메모리 허브",
|
|
1369
1373
|
"memoryHub.refresh": "새로고침",
|
|
@@ -1801,6 +1805,7 @@ const sessionTitleKo = {
|
|
|
1801
1805
|
"sessionTitle.saveFailed": "제목을 저장하지 못했습니다."
|
|
1802
1806
|
};
|
|
1803
1807
|
const accountSettingsKo = {
|
|
1808
|
+
"account.mySettings": "내 설정",
|
|
1804
1809
|
"account.logoutConfirmTitle": "로그아웃하시겠습니까?",
|
|
1805
1810
|
"account.logoutConfirmDescription": "{username} 계정에서 로그아웃합니다. 진행 중인 작업 화면은 닫힐 수 있습니다.",
|
|
1806
1811
|
"settings.sectionsAria": "환경설정 섹션",
|
|
@@ -1885,6 +1890,10 @@ const projectScopeKo = {
|
|
|
1885
1890
|
"projectScope.daemonUpgradeRequired": "Aplus CLI 업데이트 후 다시 시도해 주세요."
|
|
1886
1891
|
};
|
|
1887
1892
|
const machineSettingsConsoleKo = {
|
|
1893
|
+
"machineConsole.environmentStatus": "환경·상태",
|
|
1894
|
+
"machineConsole.homeDirectory": "홈 경로",
|
|
1895
|
+
"machineConsole.ownedMachines": "내가 등록한 머신",
|
|
1896
|
+
"machineConsole.otherMachines": "다른 머신",
|
|
1888
1897
|
"machineConsole.online": "온라인",
|
|
1889
1898
|
"machineConsole.offline": "오프라인",
|
|
1890
1899
|
"machineConsole.personal": "개인",
|
|
@@ -2121,7 +2130,20 @@ const sidebarUpdateKo = {
|
|
|
2121
2130
|
"sidebarUpdate.unsupported": "이 빌드에서는 자동 업데이트를 쓸 수 없습니다",
|
|
2122
2131
|
"sidebarUpdate.currentVersion": "현재 v{version}",
|
|
2123
2132
|
"sidebarUpdate.newVersion": "v{version}",
|
|
2124
|
-
"sidebarUpdate.installFailed": "업데이트가 적용되지 않았습니다 — v{expected} 로 바뀌었어야 하는데 여전히 v{actual} 입니다. 다시 확인"
|
|
2133
|
+
"sidebarUpdate.installFailed": "업데이트가 적용되지 않았습니다 — v{expected} 로 바뀌었어야 하는데 여전히 v{actual} 입니다. 다시 확인",
|
|
2134
|
+
"sidebarUpdate.availableTitle": "업데이트 가능",
|
|
2135
|
+
"sidebarUpdate.downloadingTitle": "업데이트 다운로드 중",
|
|
2136
|
+
"sidebarUpdate.readyTitle": "업데이트 준비 완료",
|
|
2137
|
+
"sidebarUpdate.failedTitle": "업데이트 실패",
|
|
2138
|
+
"sidebarUpdate.completedTitle": "New Updated!",
|
|
2139
|
+
"sidebarUpdate.availableBody": "Saycode v{version} 업데이트를 사용할 수 있어요.",
|
|
2140
|
+
"sidebarUpdate.downloadingBody": "Saycode v{version} 다운로드 중입니다.",
|
|
2141
|
+
"sidebarUpdate.completedBody": "Saycode v{version} 업데이트가 완료됐어요.",
|
|
2142
|
+
"sidebarUpdate.installing": "업데이트 적용 중…",
|
|
2143
|
+
"sidebarUpdate.update": "업데이트",
|
|
2144
|
+
"sidebarUpdate.restartNotice": "재시작 전에 대화 상태를 저장합니다.",
|
|
2145
|
+
"sidebarUpdate.minimize": "최소화",
|
|
2146
|
+
"sidebarUpdate.releaseNotes": "Release notes"
|
|
2125
2147
|
};
|
|
2126
2148
|
const globalPauseKo = {
|
|
2127
2149
|
"settings.globalPause.enable": "전역 일시정지 (새 자동 액션 차단)",
|
|
@@ -2684,6 +2706,15 @@ const catalogExtensionsKo = {
|
|
|
2684
2706
|
...agentBrowserConsoleKo
|
|
2685
2707
|
};
|
|
2686
2708
|
const onboardingKo = {
|
|
2709
|
+
"onboarding.accountPool.registering": "현재 로그인 계정 등록 중…",
|
|
2710
|
+
"onboarding.accountPool.ready": "현재 계정 등록·선택 완료",
|
|
2711
|
+
"onboarding.accountPool.failed": "계정 등록에 실패했습니다. 다른 AI가 준비되면 계속 진행할 수 있습니다.",
|
|
2712
|
+
"onboarding.accountPool.login-required": "Codex 인증을 갱신하려면 codex-multi-auth login으로 로그인한 뒤 다시 시도하세요.",
|
|
2713
|
+
"onboarding.accountPool.register": "등록 완료",
|
|
2714
|
+
"onboarding.accountPool.retry": "계정 등록 다시 시도",
|
|
2715
|
+
"onboarding.accountPool.usageGuide": "이 컴퓨터를 선택하세요. 좌측 하단 … → AI 잔여량 보이기를 켜면 중앙 패널 우측 상단에 표시됩니다. 눌러 등록된 계정을 확인하고 다른 계정으로 전환할 수 있습니다. 다른 머신을 선택하면 해당 머신의 계정이 표시됩니다.",
|
|
2716
|
+
"onboarding.accountPool.skip": "등록 안 함",
|
|
2717
|
+
"onboarding.accountPool.organizationHint": "개인 계정을 등록하지 않아도 조직에서 등록된 계정을 통해 사용할 수 있습니다.",
|
|
2687
2718
|
"boot.stage.app": "앱 준비 중…",
|
|
2688
2719
|
"boot.stage.localRuntime": "로컬 작업공간 준비 중…",
|
|
2689
2720
|
"login.dialogTitle": "Saycode 계정으로 로그인",
|
|
@@ -2732,9 +2763,9 @@ const onboardingKo = {
|
|
|
2732
2763
|
"onboarding.standalone.machineConnected": "로컬 머신 연결됨",
|
|
2733
2764
|
"onboarding.standalone.machineWaiting": "로컬 머신 연결 대기",
|
|
2734
2765
|
"onboarding.claude.title": "Claude Code 로그인",
|
|
2735
|
-
"onboarding.claude.body": "터미널에서
|
|
2766
|
+
"onboarding.claude.body": "터미널에서 claude auth login으로 로그인한 뒤 등록 완료를 누르세요.",
|
|
2736
2767
|
"onboarding.codex.title": "Codex 로그인",
|
|
2737
|
-
"onboarding.codex.body": "codex login
|
|
2768
|
+
"onboarding.codex.body": "터미널에서 codex login으로 로그인한 뒤 등록 완료를 누르세요.",
|
|
2738
2769
|
"onboarding.firstSession.title": "첫 대화 시작",
|
|
2739
2770
|
"onboarding.firstSession.body": "프로젝트를 선택하고 Claude Code 또는 Codex로 첫 요청을 보내세요.",
|
|
2740
2771
|
"onboarding.firstSession.action": "첫 대화 만들기",
|
|
@@ -2750,7 +2781,7 @@ const onboardingKo = {
|
|
|
2750
2781
|
"onboarding.page.happyTitle": "Saycode CLI 준비",
|
|
2751
2782
|
"onboarding.page.happyBody": "설치와 버전을 확인하고, 필요한 작업만 이 화면에서 실행합니다.",
|
|
2752
2783
|
"onboarding.page.agentsTitle": "Claude Code와 Codex",
|
|
2753
|
-
"onboarding.page.agentsBody": "사용할 AI 도구를
|
|
2784
|
+
"onboarding.page.agentsBody": "사용할 AI 도구를 준비하고 개인 계정 등록 여부를 선택하세요.",
|
|
2754
2785
|
"onboarding.page.notificationsTitle": "알림 설정",
|
|
2755
2786
|
"onboarding.page.notificationsBody": "응답 요청과 작업 완료를 놓치지 않도록 알림과 사운드를 설정하세요.",
|
|
2756
2787
|
"onboarding.page.back": "이전",
|
|
@@ -2782,6 +2813,11 @@ const onboardingKo = {
|
|
|
2782
2813
|
"onboarding.cli.checking": "설치 상태 확인 중…",
|
|
2783
2814
|
"onboarding.cli.checkFailedTitle": "설치 상태를 확인하지 못했습니다",
|
|
2784
2815
|
"onboarding.cli.checkFailedBody": "연결을 확인한 뒤 다시 시도해 주세요.",
|
|
2816
|
+
"onboarding.cli.checkFailed.check-failed": "업데이트 정보를 서버에서 받지 못했고, 이 컴퓨터의 실행 상태도 아직 확인되지 않았습니다. 잠시 후 다시 시도해 주세요.",
|
|
2817
|
+
"onboarding.cli.checkFailed.not-listed": "서버의 업데이트 목록에 이 컴퓨터가 없습니다. 이 컴퓨터 등록을 다시 확인해 주세요.",
|
|
2818
|
+
"onboarding.cli.checkFailed.offline": "이 컴퓨터의 Saycode가 오프라인입니다. 데몬이 실행 중인지 확인한 뒤 다시 시도해 주세요.",
|
|
2819
|
+
"onboarding.cli.checkFailed.version-unknown": "이 컴퓨터의 Saycode CLI 버전을 읽지 못했습니다. 잠시 후 다시 시도해 주세요.",
|
|
2820
|
+
"onboarding.cli.runningBody": "이 컴퓨터에서 Saycode CLI {version}이(가) 실행 중입니다. 최신 버전인지는 지금 확인하지 못했습니다.",
|
|
2785
2821
|
"onboarding.cli.retry": "다시 확인",
|
|
2786
2822
|
"onboarding.cli.nav.checking": "확인 중",
|
|
2787
2823
|
"onboarding.cli.nav.install-required": "설치 필요",
|
|
@@ -2890,6 +2926,17 @@ const recoveryPasskeyKo = {
|
|
|
2890
2926
|
"recoveryPasskey.openInBrowser": "웹 설정에서 열기"
|
|
2891
2927
|
};
|
|
2892
2928
|
const ko = {
|
|
2929
|
+
"assetWorkflow.open": "문서 양식",
|
|
2930
|
+
"assetWorkflow.unavailable": "선택 가능한 문서 양식 확장이 없습니다. 설정에서 설치하고 권한을 승인해 주세요.",
|
|
2931
|
+
"assetWorkflow.failed": "작업을 완료하지 못했습니다. 입력을 보존했습니다. 다시 열어 확인해 주세요.",
|
|
2932
|
+
"assetWorkflow.apply": "양식 적용",
|
|
2933
|
+
"assetWorkflow.save": "개인 양식 저장",
|
|
2934
|
+
"assetWorkflow.remove": "개인 양식 삭제",
|
|
2935
|
+
"assetWorkflow.cancel": "취소",
|
|
2936
|
+
"assetWorkflow.assetsRead": "개인 양식 조회 및 원본 읽기",
|
|
2937
|
+
"assetWorkflow.assetsWrite": "개인 양식 생성·수정·삭제",
|
|
2938
|
+
"assetWorkflow.filesSelect": "직접 선택한 파일 읽기",
|
|
2939
|
+
"assetWorkflow.draftsPrepare": "선택한 대화의 초안과 첨부 준비",
|
|
2893
2940
|
...workKo,
|
|
2894
2941
|
...usageEntryKo,
|
|
2895
2942
|
...homeTabsKo,
|
|
@@ -4289,7 +4336,7 @@ const ko = {
|
|
|
4289
4336
|
"login.mfaMethodsLead": "이 계정은 2단계 인증이 필요합니다. 패스키 또는 등록한 인증 앱으로 인증해주세요.",
|
|
4290
4337
|
"login.mfaPasskey": "패스키로 인증",
|
|
4291
4338
|
"login.mfaPasskeyRetry": "패스키 인증 다시 열기",
|
|
4292
|
-
"login.mfaPasskeyWaiting": "시스템 브라우저에서
|
|
4339
|
+
"login.mfaPasskeyWaiting": "시스템 브라우저에서 휴대폰 또는 이 컴퓨터의 패스키 인증을 완료해주세요.",
|
|
4293
4340
|
"login.mfaTotpFallback": "브라우저를 닫아도 인증 앱 코드로 계속할 수 있습니다.",
|
|
4294
4341
|
"login.mfaCodeLabel": "인증 코드",
|
|
4295
4342
|
"login.mfaCodePlaceholder": "6자리 숫자",
|
|
@@ -4298,6 +4345,8 @@ const ko = {
|
|
|
4298
4345
|
"login.mfaInvalidCode": "인증 코드가 올바르지 않습니다. 다시 시도해주세요.",
|
|
4299
4346
|
"login.mfaExpired": "인증 시간이 만료되었습니다. 다시 로그인해주세요.",
|
|
4300
4347
|
"login.mfaRateLimited": "시도가 너무 많습니다. 잠시 후 다시 시도해주세요.",
|
|
4348
|
+
"login.mfaUnavailable": "인증 서버에서 로그인을 마치지 못했습니다({detail}). 잠시 후 비밀번호부터 다시 시도해주세요.",
|
|
4349
|
+
"login.mfaCodeReplayed": "이 코드는 이미 사용했습니다. 인증 앱에 새 코드가 나오면 입력해주세요.",
|
|
4301
4350
|
"login.mfaUnsupported": "이 계정에서 사용할 수 있는 2단계 인증 방법이 없습니다. 웹에서 인증 앱 또는 패스키를 등록한 뒤 다시 시도해주세요.",
|
|
4302
4351
|
"login.mfaPasskeyFailed": "패스키 인증을 시작하지 못했습니다. 다시 시도하거나 인증 앱 코드를 사용해주세요.",
|
|
4303
4352
|
"standalone.startFailed": "로컬 standalone 서버를 시작하지 못했습니다.",
|
|
@@ -5095,6 +5144,7 @@ const ko = {
|
|
|
5095
5144
|
"terminalWorkspace.terminated": "터미널이 종료되었습니다.",
|
|
5096
5145
|
"terminalWorkspace.unpin": "고정 해제",
|
|
5097
5146
|
"terminalWorkspace.pin": "고정",
|
|
5147
|
+
"terminalWorkspace.pinDescription": "숨겨진 터미널의 유휴 자동 종료와 자원 회수를 방지합니다.",
|
|
5098
5148
|
"terminalWorkspace.endTerminal": "터미널 종료",
|
|
5099
5149
|
// SidebarProjectFiles
|
|
5100
5150
|
"sidebarFiles.title": "프로젝트 파일",
|
|
@@ -18288,7 +18338,7 @@ function requireWebsocket() {
|
|
|
18288
18338
|
const EventEmitter = require$$0$6;
|
|
18289
18339
|
const https = require$$4;
|
|
18290
18340
|
const http = require$$3;
|
|
18291
|
-
const
|
|
18341
|
+
const net2 = require$$3$1;
|
|
18292
18342
|
const tls = require$$4$1;
|
|
18293
18343
|
const { randomBytes: randomBytes2, createHash: createHash2 } = require$$0;
|
|
18294
18344
|
const { Duplex, Readable } = require$$0$5;
|
|
@@ -19032,12 +19082,12 @@ function requireWebsocket() {
|
|
|
19032
19082
|
}
|
|
19033
19083
|
function netConnect(options) {
|
|
19034
19084
|
options.path = options.socketPath;
|
|
19035
|
-
return
|
|
19085
|
+
return net2.connect(options);
|
|
19036
19086
|
}
|
|
19037
19087
|
function tlsConnect(options) {
|
|
19038
19088
|
options.path = void 0;
|
|
19039
19089
|
if (!options.servername && options.servername !== "") {
|
|
19040
|
-
options.servername =
|
|
19090
|
+
options.servername = net2.isIP(options.host) ? "" : options.host;
|
|
19041
19091
|
}
|
|
19042
19092
|
return tls.connect(options);
|
|
19043
19093
|
}
|
|
@@ -33722,6 +33772,7 @@ function createHostController(deps) {
|
|
|
33722
33772
|
if (!who) throw new HostCallError("HOST_CREDENTIAL_UNVERIFIED");
|
|
33723
33773
|
if (who.scopeKey !== scopeKey2 || who.machineId !== deps.machineId) throw new HostCallError("HOST_SCOPE_MISMATCH");
|
|
33724
33774
|
if (binding && binding.scopeKey !== who.scopeKey) throw new HostCallError("HOST_SCOPE_MISMATCH");
|
|
33775
|
+
if (binding && binding.userId !== who.userId) throw new HostCallError("HOST_USER_MISMATCH");
|
|
33725
33776
|
const next = { scopeKey: who.scopeKey, machineId: who.machineId, userId: who.userId, companyId: who.companyId, apiBaseUrl: p.apiBaseUrl };
|
|
33726
33777
|
token = { token: p.token, expiresAt: p.expiresAt };
|
|
33727
33778
|
await deps.store.saveToken(token);
|
|
@@ -34333,6 +34384,10 @@ function parseExtensionChannelContributions(value2) {
|
|
|
34333
34384
|
});
|
|
34334
34385
|
}
|
|
34335
34386
|
const EXTENSION_PERMISSIONS = [
|
|
34387
|
+
"assets.read",
|
|
34388
|
+
"assets.write",
|
|
34389
|
+
"files.select",
|
|
34390
|
+
"drafts.prepare",
|
|
34336
34391
|
"projects.read",
|
|
34337
34392
|
"remoteFiles.read",
|
|
34338
34393
|
"remoteFiles.write",
|
|
@@ -34362,7 +34417,7 @@ const EXTENSION_PERMISSIONS = [
|
|
|
34362
34417
|
const SAYCODE_EXTENSION_API_VERSION = 3;
|
|
34363
34418
|
const SAYCODE_EXTENSION_MINIMUM_API_VERSION = 2;
|
|
34364
34419
|
const MAX_EXTENSION_API_WINDOW_WIDTH = 2;
|
|
34365
|
-
const SAYCODE_EXTENSION_ENGINE_VERSION = "1.
|
|
34420
|
+
const SAYCODE_EXTENSION_ENGINE_VERSION = "1.1.0";
|
|
34366
34421
|
const SAYCODE_CHANNEL_API_VERSION = CHANNEL_API_VERSION;
|
|
34367
34422
|
const SAYCODE_CHANNEL_MINIMUM_API_VERSION = CHANNEL_MINIMUM_API_VERSION;
|
|
34368
34423
|
class UnsupportedChannelApiVersionError2 extends Error {
|
|
@@ -34392,7 +34447,7 @@ const V2_PERMISSIONS = /* @__PURE__ */ new Set([
|
|
|
34392
34447
|
"browserViewer.install",
|
|
34393
34448
|
"browserViewer.installChrome"
|
|
34394
34449
|
]);
|
|
34395
|
-
const V3_PERMISSIONS = /* @__PURE__ */ new Set(["artifacts.publishPublic"]);
|
|
34450
|
+
const V3_PERMISSIONS = /* @__PURE__ */ new Set(["artifacts.publishPublic", "assets.read", "assets.write", "files.select", "drafts.prepare"]);
|
|
34396
34451
|
const CHANNEL_PERMISSIONS = /* @__PURE__ */ new Set([
|
|
34397
34452
|
"channels.receive",
|
|
34398
34453
|
"channels.ack",
|
|
@@ -34953,6 +35008,12 @@ async function openChannelHostKey(input) {
|
|
|
34953
35008
|
await rename(staging, path);
|
|
34954
35009
|
return describe(secretKey);
|
|
34955
35010
|
}
|
|
35011
|
+
const ATTEMPT_MS = 1e3;
|
|
35012
|
+
function widenConnectAttempts() {
|
|
35013
|
+
if (net.getDefaultAutoSelectFamilyAttemptTimeout() < ATTEMPT_MS) {
|
|
35014
|
+
net.setDefaultAutoSelectFamilyAttemptTimeout(ATTEMPT_MS);
|
|
35015
|
+
}
|
|
35016
|
+
}
|
|
34956
35017
|
function defaultIsAlive(pid) {
|
|
34957
35018
|
try {
|
|
34958
35019
|
process.kill(pid, 0);
|
|
@@ -45357,7 +45418,7 @@ function resolvePersonalChatWorkspaceDirectory(input) {
|
|
|
45357
45418
|
machineHomeDir: input.machine.homeDir,
|
|
45358
45419
|
userId: input.userId
|
|
45359
45420
|
});
|
|
45360
|
-
return userDirectory ?
|
|
45421
|
+
return userDirectory ? appendDirectorySegments(userDirectory, ["chats", input.chatId]) : null;
|
|
45361
45422
|
}
|
|
45362
45423
|
async function createPersonalChatSession(input, deps = {}) {
|
|
45363
45424
|
if (!input.machine.online) throw new Error(translateCurrent("sessionCreation.machineOfflineSelected"));
|
|
@@ -45398,9 +45459,9 @@ async function createPersonalChatSession(input, deps = {}) {
|
|
|
45398
45459
|
}
|
|
45399
45460
|
}
|
|
45400
45461
|
const REAL_HAPPY_SESSION_CONNECTION_DEPS = {
|
|
45401
|
-
reconnectMcp: async (input) => (await import("./assets/sessionMcpReconnect-
|
|
45402
|
-
readCodexAuthStatus: (input) => import("./assets/codexAuthRecoveryRpc-
|
|
45403
|
-
recoverCodexAuth: (input) => import("./assets/codexAuthRecoveryRpc-
|
|
45462
|
+
reconnectMcp: async (input) => (await import("./assets/sessionMcpReconnect-DC2ffWe8.js")).reconnectDesktopSessionMcp(input),
|
|
45463
|
+
readCodexAuthStatus: (input) => import("./assets/codexAuthRecoveryRpc-DZubmLWa.js").then((module) => module.readCodexAuthStatus(input)),
|
|
45464
|
+
recoverCodexAuth: (input) => import("./assets/codexAuthRecoveryRpc-DZubmLWa.js").then((module) => module.recoverCodexAuth(input)),
|
|
45404
45465
|
prompt: async ({ auth, sessionId, ...input }) => {
|
|
45405
45466
|
const encryption = resolveSessionWriteEncryption(sessionId);
|
|
45406
45467
|
if (encryption.kind === "blocked") throw new SessionWriteLockedError();
|
|
@@ -49068,6 +49129,10 @@ class CapabilityBroker {
|
|
|
49068
49129
|
return assertSafeExtensionDto(result);
|
|
49069
49130
|
}
|
|
49070
49131
|
}
|
|
49132
|
+
const ASSET_PERMISSIONS = ["assets.read", "assets.write", "files.select", "drafts.prepare"];
|
|
49133
|
+
function usesAssetWorkflow(permissions) {
|
|
49134
|
+
return permissions.some((permission) => ASSET_PERMISSIONS.includes(permission));
|
|
49135
|
+
}
|
|
49071
49136
|
class ExtensionHostProcessError extends Error {
|
|
49072
49137
|
constructor(code, message) {
|
|
49073
49138
|
super(message);
|
|
@@ -49406,6 +49471,7 @@ class ExtensionHostManager {
|
|
|
49406
49471
|
const broker = this.options.capabilityBrokerFor?.(manifest2);
|
|
49407
49472
|
let process2;
|
|
49408
49473
|
process2 = new ExtensionHostProcess({
|
|
49474
|
+
requestTimeoutMs: usesAssetWorkflow(manifest2.permissions) ? 14e4 : void 0,
|
|
49409
49475
|
apiVersion: manifest2.apiVersion,
|
|
49410
49476
|
extensionId: manifest2.id,
|
|
49411
49477
|
extensionVersion: manifest2.version,
|
|
@@ -59675,6 +59741,15 @@ function fenceLeaseByProvider(inner, input) {
|
|
|
59675
59741
|
stop: () => inner.stop()
|
|
59676
59742
|
};
|
|
59677
59743
|
}
|
|
59744
|
+
function createAdmittedProviders() {
|
|
59745
|
+
const providers = /* @__PURE__ */ new Map();
|
|
59746
|
+
return {
|
|
59747
|
+
admit: (connectionId2, provider2) => {
|
|
59748
|
+
providers.set(connectionId2, provider2);
|
|
59749
|
+
},
|
|
59750
|
+
providerOf: async (connectionId2) => providers.get(connectionId2) ?? null
|
|
59751
|
+
};
|
|
59752
|
+
}
|
|
59678
59753
|
const FILE = "session-keys.v1.json";
|
|
59679
59754
|
const DEFAULT_LIMIT = 500;
|
|
59680
59755
|
function createHostSessionKeyStore(input) {
|
|
@@ -59850,7 +59925,14 @@ function hostAuthSession(init, binding, token) {
|
|
|
59850
59925
|
activeCompanyId: binding.companyId
|
|
59851
59926
|
};
|
|
59852
59927
|
}
|
|
59853
|
-
|
|
59928
|
+
const REGISTRY_TYPES = /* @__PURE__ */ new Set(["personal", "dedicated", "shared"]);
|
|
59929
|
+
function parseHostMachineRegistry(value2) {
|
|
59930
|
+
if (!value2 || typeof value2 !== "object") return null;
|
|
59931
|
+
const { type, workspaceRoot } = value2;
|
|
59932
|
+
if (typeof type !== "string" || !REGISTRY_TYPES.has(type)) return null;
|
|
59933
|
+
return { type, ...typeof workspaceRoot === "string" && workspaceRoot ? { workspaceRoot } : {} };
|
|
59934
|
+
}
|
|
59935
|
+
function hostMachine(init, now, registry2) {
|
|
59854
59936
|
return {
|
|
59855
59937
|
...init.machine.capabilities ?? {},
|
|
59856
59938
|
id: init.machine.id,
|
|
@@ -59858,7 +59940,8 @@ function hostMachine(init, now) {
|
|
|
59858
59940
|
platform: init.machine.platform,
|
|
59859
59941
|
homeDir: init.machine.homeDir,
|
|
59860
59942
|
online: true,
|
|
59861
|
-
activeAt: now
|
|
59943
|
+
activeAt: now,
|
|
59944
|
+
...registry2 ? { registry: registry2 } : {}
|
|
59862
59945
|
};
|
|
59863
59946
|
}
|
|
59864
59947
|
function adoptReplyKey(sessionId, reply) {
|
|
@@ -59889,6 +59972,7 @@ async function openHostRuntime(input) {
|
|
|
59889
59972
|
await candidates2.refresh();
|
|
59890
59973
|
const usableCandidates = () => input.sandbox ? candidates2.candidates() : [];
|
|
59891
59974
|
let disabledProviders = /* @__PURE__ */ new Set();
|
|
59975
|
+
const providers = createAdmittedProviders();
|
|
59892
59976
|
const ownerId = `host-${createHash("sha256").update(`${process.pid}:${Date.now()}:${Math.random()}`).digest("hex").slice(0, 24)}`;
|
|
59893
59977
|
let runtime = null;
|
|
59894
59978
|
const leases = createChannelGatewayLeaseSupervisor({
|
|
@@ -59900,18 +59984,14 @@ async function openHostRuntime(input) {
|
|
|
59900
59984
|
monotonicNow: () => performance.now(),
|
|
59901
59985
|
fetch: (url2, init) => fetch(url2, init)
|
|
59902
59986
|
}), {
|
|
59903
|
-
providerOf:
|
|
59904
|
-
const snapshot = await runtime?.settingsServiceFor(auth())?.call("channels:snapshot", null);
|
|
59905
|
-
const entry = snapshot ? Object.values(snapshot.connections).find((connection) => connection.connectionId === connectionId2) : void 0;
|
|
59906
|
-
return entry?.provider ?? null;
|
|
59907
|
-
},
|
|
59987
|
+
providerOf: () => providers.providerOf(connectionId2),
|
|
59908
59988
|
disabled: () => disabledProviders
|
|
59909
59989
|
}),
|
|
59910
59990
|
stopReceiving: (connectionId2) => runtime?.pauseReceivingFor(connectionId2) ?? Promise.resolve(),
|
|
59911
59991
|
resumeReceiving: (connectionId2) => runtime?.resumeReceivingFor(connectionId2) ?? Promise.resolve(),
|
|
59912
59992
|
onDiagnostic: ({ code }) => input.report(code)
|
|
59913
59993
|
});
|
|
59914
|
-
const machine = () => hostMachine(input.init, Date.now());
|
|
59994
|
+
const machine = async () => hostMachine(input.init, Date.now(), await input.machineRegistry().catch(() => null));
|
|
59915
59995
|
const sessionKeys = createHostSessionKeyStore({ dir: dataDir, safeStorage: input.safeStorage });
|
|
59916
59996
|
const keep = (sessionId, reply) => {
|
|
59917
59997
|
const key = adoptReplyKey(sessionId, reply);
|
|
@@ -59928,7 +60008,7 @@ async function openHostRuntime(input) {
|
|
|
59928
60008
|
if (reply) keep(sessionId, reply);
|
|
59929
60009
|
};
|
|
59930
60010
|
const base2 = createChannelSessionOperations({
|
|
59931
|
-
listMachines: async () => [machine()],
|
|
60011
|
+
listMachines: async () => [await machine()],
|
|
59932
60012
|
spawn: async (spawnInput) => {
|
|
59933
60013
|
const reply = await input.bridge.request("spawn", {
|
|
59934
60014
|
directory: spawnInput.directory,
|
|
@@ -59982,7 +60062,10 @@ async function openHostRuntime(input) {
|
|
|
59982
60062
|
isEstopEngaged: async () => input.isPaused(),
|
|
59983
60063
|
mayActForConnection: (connectionId2) => leases.holdsLease(connectionId2),
|
|
59984
60064
|
standingBy: () => leases.standingBy(),
|
|
59985
|
-
admitReceiving: ({ connectionId: connectionId2, provider: provider2, installationId }) =>
|
|
60065
|
+
admitReceiving: ({ connectionId: connectionId2, provider: provider2, installationId }) => {
|
|
60066
|
+
providers.admit(connectionId2, provider2);
|
|
60067
|
+
return leases.admit({ connectionId: connectionId2, connectionDigest: channelLeaseSubject({ provider: provider2, installationId }) });
|
|
60068
|
+
},
|
|
59986
60069
|
authorizeExecution: (request) => deliverDesktopChannelAuthorize(request),
|
|
59987
60070
|
cancelExecution: (request) => deliverDesktopChannelCancel(request),
|
|
59988
60071
|
formatReply: async (request, isCurrent) => {
|
|
@@ -60069,8 +60152,8 @@ async function openHostRuntime(input) {
|
|
|
60069
60152
|
return service.call(call, payload);
|
|
60070
60153
|
},
|
|
60071
60154
|
refreshAuthority: adoptAuthority,
|
|
60072
|
-
setDisabledProviders(
|
|
60073
|
-
disabledProviders = new Set(
|
|
60155
|
+
setDisabledProviders(providers2) {
|
|
60156
|
+
disabledProviders = new Set(providers2);
|
|
60074
60157
|
},
|
|
60075
60158
|
async refreshAdapters() {
|
|
60076
60159
|
await registry2.load();
|
|
@@ -60266,7 +60349,13 @@ async function whoami(apiBaseUrl, token) {
|
|
|
60266
60349
|
if (typeof body.scopeKey !== "string" || typeof body.machineId !== "string" || typeof body.userId !== "string") {
|
|
60267
60350
|
throw new Error("HOST_CREDENTIAL_UNVERIFIED");
|
|
60268
60351
|
}
|
|
60269
|
-
return {
|
|
60352
|
+
return {
|
|
60353
|
+
scopeKey: body.scopeKey,
|
|
60354
|
+
machineId: body.machineId,
|
|
60355
|
+
userId: body.userId,
|
|
60356
|
+
companyId: typeof body.companyId === "string" ? body.companyId : null,
|
|
60357
|
+
machine: parseHostMachineRegistry(body.machine)
|
|
60358
|
+
};
|
|
60270
60359
|
}
|
|
60271
60360
|
async function runChannelHost() {
|
|
60272
60361
|
const lines = createInterface({ input: process.stdin });
|
|
@@ -60292,6 +60381,7 @@ async function runChannelHost() {
|
|
|
60292
60381
|
});
|
|
60293
60382
|
if (!init) return unavailable2("INIT_INVALID");
|
|
60294
60383
|
if (!nodeSupportsPermission(process.version)) return unavailable2("NODE_TOO_OLD");
|
|
60384
|
+
widenConnectAttempts();
|
|
60295
60385
|
await mkdir(init.dataDir, { recursive: true, mode: 448 });
|
|
60296
60386
|
const lock = await acquireChannelHostLock({ dir: init.dataDir });
|
|
60297
60387
|
if (lock.kind !== "held") return unavailable2("LOCK_HELD");
|
|
@@ -60316,7 +60406,8 @@ async function runChannelHost() {
|
|
|
60316
60406
|
whoami,
|
|
60317
60407
|
serverFor: (binding, token) => createHostServerClient({ apiBaseUrl: binding.apiBaseUrl, token }),
|
|
60318
60408
|
openRuntime: async ({ binding, token, isPaused }) => {
|
|
60319
|
-
|
|
60409
|
+
const machineRegistry = async () => (await whoami(binding.apiBaseUrl, token())).machine;
|
|
60410
|
+
opened = await openHostRuntime({ init, binding, token, isPaused, safeStorage, bridge, sandbox, extensionRoot: layout?.extensionRoot ?? init.extensionsDir, bootstrapPath, report, machineRegistry });
|
|
60320
60411
|
catalog2 = createRemoteExtensionCatalog({
|
|
60321
60412
|
cachePath: join(init.dataDir, "extension-catalog.v1.json"),
|
|
60322
60413
|
revocations: opened.extensions.revocations,
|