@dotobokuri/fleet-console 1.44.1 → 1.46.0
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.d.ts +5 -1
- package/dist/cli.mjs +3297 -3831
- package/dist/client/assets/{_baseUniq-DfRTNtWd.js → _baseUniq-CaqaUUIT.js} +1 -1
- package/dist/client/assets/{arc-Ds9vyD8n.js → arc-B4MjkR5w.js} +1 -1
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-pZ_1tCpx.js → architectureDiagram-Q4EWVU46-wP-4WWY-.js} +1 -1
- package/dist/client/assets/{blockDiagram-DXYQGD6D-nntXWaQ9.js → blockDiagram-DXYQGD6D-D5Y2AdkX.js} +1 -1
- package/dist/client/assets/{c4Diagram-AHTNJAMY-AHAd4NjZ.js → c4Diagram-AHTNJAMY-hKNJrUod.js} +1 -1
- package/dist/client/assets/channel-Cy7Wdt-y.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-BNfWXMb-.js → chunk-4BX2VUAB-RdaAserw.js} +1 -1
- package/dist/client/assets/{chunk-4TB4RGXK-B5MiBj0N.js → chunk-4TB4RGXK-BVvGheRq.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-9vJ9AfWn.js → chunk-55IACEB6-BKBu793s.js} +1 -1
- package/dist/client/assets/{chunk-EDXVE4YY-CpxmITfr.js → chunk-EDXVE4YY-CF6P1HJI.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-BoUi1EcN.js → chunk-FMBD7UC4-DYrffXxC.js} +1 -1
- package/dist/client/assets/{chunk-OYMX7WX6-s7qMNTfq.js → chunk-OYMX7WX6-ggkv39bf.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-Bdgo-JE9.js → chunk-QZHKN3VN-DfsoMKS1.js} +1 -1
- package/dist/client/assets/{chunk-YZCP3GAM-C9RCb0eu.js → chunk-YZCP3GAM-nK3fd1vK.js} +1 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-BXKZy3mo.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-BXKZy3mo.js +1 -0
- package/dist/client/assets/clone-BaDkZwuY.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-Mr2xbCPD.js → cose-bilkent-S5V4N54A-BXTuHPIj.js} +1 -1
- package/dist/client/assets/{dagre-KV5264BT-xIfrxsrb.js → dagre-KV5264BT-Bz4nIBUS.js} +1 -1
- package/dist/client/assets/{diagram-5BDNPKRD-BM49JRbq.js → diagram-5BDNPKRD-ByqgG2sy.js} +1 -1
- package/dist/client/assets/{diagram-G4DWMVQ6-uMduxuqy.js → diagram-G4DWMVQ6-D6Bh5CCC.js} +1 -1
- package/dist/client/assets/{diagram-MMDJMWI5-BfCnnu9a.js → diagram-MMDJMWI5-CfDQLuVW.js} +1 -1
- package/dist/client/assets/{diagram-TYMM5635-DTVL_WEx.js → diagram-TYMM5635-KI98IUyc.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-BUQDjGU2.js → erDiagram-SMLLAGMA-CqprUEiC.js} +1 -1
- package/dist/client/assets/{flowDiagram-DWJPFMVM-RZ85tRp5.js → flowDiagram-DWJPFMVM-ABvSPDqG.js} +1 -1
- package/dist/client/assets/{ganttDiagram-T4ZO3ILL-CenzFyys.js → ganttDiagram-T4ZO3ILL-Dsx-U_Nn.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-BpkFTm7f.js → gitGraphDiagram-UUTBAWPF-BSUFEUnR.js} +1 -1
- package/dist/client/assets/{graph-BlyDgw2r.js → graph-CzNfjcWq.js} +1 -1
- package/dist/client/assets/index-DJz5h6Wn.js +482 -0
- package/dist/client/assets/index-DuMyAui7.css +1 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-ZB4pKXQT.js → infoDiagram-42DDH7IO-Ds0ENS7R.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-BfXl0ksQ.js → ishikawaDiagram-UXIWVN3A-B18YRUdD.js} +1 -1
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-DCSluqxm.js → journeyDiagram-VCZTEJTY-BupFc-Zd.js} +1 -1
- package/dist/client/assets/{kanban-definition-6JOO6SKY-5X3OxziR.js → kanban-definition-6JOO6SKY-BSLofAt_.js} +1 -1
- package/dist/client/assets/{layout-C2Jxamqz.js → layout-Dv50_a5m.js} +1 -1
- package/dist/client/assets/{linear-DgO5otCG.js → linear-BrKghOcX.js} +1 -1
- package/dist/client/assets/{mermaid.core-CqKupZd5.js → mermaid.core-CxEBNiNY.js} +4 -4
- package/dist/client/assets/{min-B9jNVA7s.js → min-CCGzVC9y.js} +1 -1
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-B_Clh0rq.js → mindmap-definition-QFDTVHPH-BrgndQgy.js} +1 -1
- package/dist/client/assets/{pieDiagram-DEJITSTG-D1rR7mwo.js → pieDiagram-DEJITSTG-DaQb845q.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-34T5L4WZ-CGnU5k3k.js → quadrantDiagram-34T5L4WZ-BKqKJrUA.js} +1 -1
- package/dist/client/assets/{requirementDiagram-MS252O5E-BDFOsklw.js → requirementDiagram-MS252O5E-DDEiXfFB.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-DT-8dpb6.js → sankeyDiagram-XADWPNL6-Bz8ZuIVc.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-FGHM5R23-3IY8NxLM.js → sequenceDiagram-FGHM5R23-DIKllaFC.js} +1 -1
- package/dist/client/assets/{stateDiagram-FHFEXIEX-DqaGlW3D.js → stateDiagram-FHFEXIEX-DVGXi05S.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BpjJbYdv.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-DmOlxq0r.js → timeline-definition-GMOUNBTQ-BysxZqEH.js} +1 -1
- package/dist/client/assets/{vennDiagram-DHZGUBPP-UsUm6iWZ.js → vennDiagram-DHZGUBPP-zKrKFH0U.js} +1 -1
- package/dist/client/assets/{wardley-RL74JXVD-C0JK7zQx.js → wardley-RL74JXVD-Bfs1dQE_.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-pFHz6DzF.js → wardleyDiagram-NUSXRM2D-9Nv_Fl4e.js} +1 -1
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-Cgy9Igjb.js → xychartDiagram-5P7HB3ND-BxnDNWHU.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/fleet-plugins/file-explorer/routes.mjs +647 -648
- package/dist/fleet-plugins/ledger/routes.mjs +46 -110
- package/dist/fleet-plugins/quota/routes.mjs +590 -187
- package/dist/fleet-plugins/repository/routes.mjs +26 -11
- package/dist/fleet-plugins/scuttlebutt/routes.mjs +150 -707
- package/dist/fleet-plugins/skills/routes.mjs +46 -110
- package/dist/fleet-plugins/terminal/routes.mjs +6599 -7096
- package/package.json +1 -1
- package/dist/client/assets/channel-D_VyV3Fr.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-TBLL_03g.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-TBLL_03g.js +0 -1
- package/dist/client/assets/clone-CYDDwEhh.js +0 -1
- package/dist/client/assets/index-BAMerP8r.js +0 -452
- package/dist/client/assets/index-BmGY-BNs.css +0 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-2tlPZvTx.js +0 -1
|
@@ -18331,8 +18331,6 @@ function parsePathExt(pathExt) {
|
|
|
18331
18331
|
const raw = pathExt && pathExt.trim().length > 0 ? pathExt : DEFAULT_WINDOWS_PATHEXT;
|
|
18332
18332
|
return raw.split(WINDOWS_PATH_SEPARATOR).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
18333
18333
|
}
|
|
18334
|
-
|
|
18335
|
-
// ../../packages/core-process/src/hidden.ts
|
|
18336
18334
|
function withHidden(options) {
|
|
18337
18335
|
return { ...options ?? {}, windowsHide: true };
|
|
18338
18336
|
}
|
|
@@ -19361,223 +19359,6 @@ function inferBinName(packageName) {
|
|
|
19361
19359
|
return lastSegment.replace(/@[^@/]+$/, "");
|
|
19362
19360
|
}
|
|
19363
19361
|
|
|
19364
|
-
// ../../packages/core-unified-agent/models.json
|
|
19365
|
-
var models_default = {
|
|
19366
|
-
version: 1,
|
|
19367
|
-
updatedAt: "2026-07-25T00:00:00Z",
|
|
19368
|
-
providers: {
|
|
19369
|
-
claude: {
|
|
19370
|
-
name: "Claude Code",
|
|
19371
|
-
defaultModel: "opus[1m]",
|
|
19372
|
-
models: [
|
|
19373
|
-
{ modelId: "haiku", name: "Claude Haiku", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "low" } },
|
|
19374
|
-
{ modelId: "sonnet", name: "Claude Sonnet", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19375
|
-
{ modelId: "opus", name: "Claude Opus", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19376
|
-
{ modelId: "opus[1m]", name: "Claude Opus [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19377
|
-
{ modelId: "claude-opus-4-6[1m]", name: "Claude Opus 4.6 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19378
|
-
{ modelId: "claude-opus-4-7[1m]", name: "Claude Opus 4.7 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19379
|
-
{ modelId: "claude-opus-4-8[1m]", name: "Claude Opus 4.8 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } }
|
|
19380
|
-
]
|
|
19381
|
-
},
|
|
19382
|
-
codex: {
|
|
19383
|
-
name: "Codex",
|
|
19384
|
-
defaultModel: "gpt-5.6-sol",
|
|
19385
|
-
models: [
|
|
19386
|
-
{ modelId: "gpt-5.6-sol", name: "GPT-5.6-Sol", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "low" } },
|
|
19387
|
-
{ modelId: "gpt-5.6-sol-fast", name: "GPT-5.6-Sol Fast", providerModelId: "gpt-5.6-sol", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "low" } },
|
|
19388
|
-
{ modelId: "gpt-5.6-terra", name: "GPT-5.6-Terra", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "medium" } },
|
|
19389
|
-
{ modelId: "gpt-5.6-terra-fast", name: "GPT-5.6-Terra Fast", providerModelId: "gpt-5.6-terra", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "medium" } },
|
|
19390
|
-
{ modelId: "gpt-5.6-luna", name: "GPT-5.6-Luna", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19391
|
-
{ modelId: "gpt-5.6-luna-fast", name: "GPT-5.6-Luna Fast", providerModelId: "gpt-5.6-luna", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19392
|
-
{ modelId: "gpt-5.5", name: "GPT-5.5", effort: { supported: true, levels: ["low", "medium", "high", "xhigh"], default: "high" } },
|
|
19393
|
-
{ modelId: "gpt-5.5-fast", name: "GPT-5.5 Fast", providerModelId: "gpt-5.5", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh"], default: "high" } }
|
|
19394
|
-
]
|
|
19395
|
-
},
|
|
19396
|
-
cursor: {
|
|
19397
|
-
name: "Cursor Agent",
|
|
19398
|
-
defaultModel: "auto",
|
|
19399
|
-
models: [
|
|
19400
|
-
{ modelId: "auto", name: "Auto", effort: { supported: false } },
|
|
19401
|
-
{ modelId: "composer-2.5", name: "Composer 2.5", effort: { supported: false } },
|
|
19402
|
-
{ modelId: "composer-2.5-fast", name: "Composer 2.5 Fast", effort: { supported: false } },
|
|
19403
|
-
{ modelId: "gpt-5.6-sol", name: "GPT-5.6 Sol", spawnModelTemplate: "gpt-5.6-sol-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19404
|
-
{ modelId: "gpt-5.6-sol-fast", name: "GPT-5.6 Sol Fast", spawnModelTemplate: "gpt-5.6-sol-{effort}-fast", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19405
|
-
{ modelId: "gpt-5.6-sol-none", name: "GPT-5.6 Sol None", effort: { supported: false } },
|
|
19406
|
-
{ modelId: "gpt-5.6-sol-none-fast", name: "GPT-5.6 Sol None Fast", effort: { supported: false } },
|
|
19407
|
-
{ modelId: "gpt-5.6-luna", name: "GPT-5.6 Luna", spawnModelTemplate: "gpt-5.6-luna-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19408
|
-
{ modelId: "gpt-5.6-luna-fast", name: "GPT-5.6 Luna Fast", spawnModelTemplate: "gpt-5.6-luna-{effort}-fast", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19409
|
-
{ modelId: "gpt-5.6-luna-none", name: "GPT-5.6 Luna None", effort: { supported: false } },
|
|
19410
|
-
{ modelId: "gpt-5.6-luna-none-fast", name: "GPT-5.6 Luna None Fast", effort: { supported: false } },
|
|
19411
|
-
{ modelId: "gpt-5.6-terra", name: "GPT-5.6 Terra", spawnModelTemplate: "gpt-5.6-terra-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19412
|
-
{ modelId: "gpt-5.6-terra-fast", name: "GPT-5.6 Terra Fast", spawnModelTemplate: "gpt-5.6-terra-{effort}-fast", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19413
|
-
{ modelId: "gpt-5.6-terra-none", name: "GPT-5.6 Terra None", effort: { supported: false } },
|
|
19414
|
-
{ modelId: "gpt-5.6-terra-none-fast", name: "GPT-5.6 Terra None Fast", effort: { supported: false } },
|
|
19415
|
-
{ modelId: "cursor-grok-4.5", name: "Cursor Grok 4.5", spawnModelTemplate: "cursor-grok-4.5-{effort}", effort: { supported: true, levels: ["low", "medium", "high"], default: "high" } },
|
|
19416
|
-
{ modelId: "cursor-grok-4.5-fast", name: "Cursor Grok 4.5 Fast", spawnModelTemplate: "cursor-grok-4.5-{effort}-fast", effort: { supported: true, levels: ["low", "medium", "high"], default: "high" } },
|
|
19417
|
-
{ modelId: "claude-opus-4-8", name: "Claude Opus 4.8", spawnModelTemplate: "claude-opus-4-8-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19418
|
-
{ modelId: "claude-opus-4-8-fast", name: "Claude Opus 4.8 Fast", spawnModelTemplate: "claude-opus-4-8-{effort}-fast", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19419
|
-
{ modelId: "claude-opus-4-8-thinking", name: "Claude Opus 4.8 Thinking", spawnModelTemplate: "claude-opus-4-8-thinking-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19420
|
-
{ modelId: "claude-opus-4-8-thinking-fast", name: "Claude Opus 4.8 Thinking Fast", spawnModelTemplate: "claude-opus-4-8-thinking-{effort}-fast", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19421
|
-
{ modelId: "claude-sonnet-5", name: "Claude Sonnet 5", spawnModelTemplate: "claude-sonnet-5-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19422
|
-
{ modelId: "claude-sonnet-5-thinking", name: "Claude Sonnet 5 Thinking", spawnModelTemplate: "claude-sonnet-5-thinking-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19423
|
-
{ modelId: "claude-fable-5", name: "Claude Fable 5", description: "NO ZDR per cursor-agent model list", spawnModelTemplate: "claude-fable-5-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19424
|
-
{ modelId: "claude-fable-5-thinking", name: "Claude Fable 5 Thinking", description: "NO ZDR per cursor-agent model list", spawnModelTemplate: "claude-fable-5-thinking-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19425
|
-
{ modelId: "gemini-3.1-pro", name: "Gemini 3.1 Pro", effort: { supported: false } },
|
|
19426
|
-
{ modelId: "gemini-3.5-flash", name: "Gemini 3.5 Flash", effort: { supported: false } },
|
|
19427
|
-
{ modelId: "kimi-k2.7-code", name: "Kimi K2.7 Code", effort: { supported: false } },
|
|
19428
|
-
{ modelId: "glm-5.2", name: "GLM 5.2", spawnModelTemplate: "glm-5.2-{effort}", effort: { supported: true, levels: ["high", "max"], default: "max" } }
|
|
19429
|
-
]
|
|
19430
|
-
}
|
|
19431
|
-
}
|
|
19432
|
-
};
|
|
19433
|
-
|
|
19434
|
-
// ../../packages/core-unified-agent/src/models/schemas.ts
|
|
19435
|
-
var EffortLevelSchema = external_exports.enum([
|
|
19436
|
-
"low",
|
|
19437
|
-
"medium",
|
|
19438
|
-
"high",
|
|
19439
|
-
"xhigh",
|
|
19440
|
-
"max",
|
|
19441
|
-
"ultra"
|
|
19442
|
-
]);
|
|
19443
|
-
var EffortSchema = external_exports.union([
|
|
19444
|
-
external_exports.object({
|
|
19445
|
-
supported: external_exports.literal(true),
|
|
19446
|
-
levels: external_exports.array(EffortLevelSchema).min(1),
|
|
19447
|
-
default: EffortLevelSchema
|
|
19448
|
-
}).strict(),
|
|
19449
|
-
external_exports.object({
|
|
19450
|
-
supported: external_exports.literal(false)
|
|
19451
|
-
}).strict()
|
|
19452
|
-
]);
|
|
19453
|
-
var ModelEntrySchema = external_exports.object({
|
|
19454
|
-
/** 모델 고유 식별자 (session/set_model에 전달되는 값) */
|
|
19455
|
-
modelId: external_exports.string(),
|
|
19456
|
-
/** 사람이 읽을 수 있는 모델 이름 */
|
|
19457
|
-
name: external_exports.string(),
|
|
19458
|
-
/** 모델 설명 (선택) */
|
|
19459
|
-
description: external_exports.string().optional(),
|
|
19460
|
-
/** spawn 시 실제 CLI 모델 ID를 조립해야 하는 경우의 템플릿 */
|
|
19461
|
-
spawnModelTemplate: external_exports.string().optional(),
|
|
19462
|
-
/** 카탈로그 ID와 실제 provider 모델 ID가 다른 경우의 원본 모델 ID */
|
|
19463
|
-
providerModelId: external_exports.string().optional(),
|
|
19464
|
-
/** provider가 모델과 별도로 받는 서비스 티어 */
|
|
19465
|
-
serviceTier: external_exports.string().optional(),
|
|
19466
|
-
/** 모델의 컨텍스트 윈도우 크기 (토큰) */
|
|
19467
|
-
contextWindow: external_exports.number().int().positive().optional(),
|
|
19468
|
-
/** 모델별 effort 설정 */
|
|
19469
|
-
effort: EffortSchema
|
|
19470
|
-
}).check((ctx) => {
|
|
19471
|
-
const effort = ctx.value.effort;
|
|
19472
|
-
if (effort.supported && !effort.levels.includes(effort.default)) {
|
|
19473
|
-
ctx.issues.push({
|
|
19474
|
-
code: "custom",
|
|
19475
|
-
input: effort.default,
|
|
19476
|
-
message: `effort.default "${effort.default}"\uC740(\uB294) levels \uBAA9\uB85D\uC5D0 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4`,
|
|
19477
|
-
path: ["effort", "default"]
|
|
19478
|
-
});
|
|
19479
|
-
}
|
|
19480
|
-
if (effort.supported && ctx.value.spawnModelTemplate && !ctx.value.spawnModelTemplate.includes("{effort}")) {
|
|
19481
|
-
ctx.issues.push({
|
|
19482
|
-
code: "custom",
|
|
19483
|
-
input: ctx.value.spawnModelTemplate,
|
|
19484
|
-
message: 'effort \uC9C0\uC6D0 \uBAA8\uB378\uC758 spawnModelTemplate\uC740 "{effort}" \uD50C\uB808\uC774\uC2A4\uD640\uB354\uB97C \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4',
|
|
19485
|
-
path: ["spawnModelTemplate"]
|
|
19486
|
-
});
|
|
19487
|
-
}
|
|
19488
|
-
if (ctx.value.serviceTier && !ctx.value.providerModelId) {
|
|
19489
|
-
ctx.issues.push({
|
|
19490
|
-
code: "custom",
|
|
19491
|
-
input: ctx.value.serviceTier,
|
|
19492
|
-
message: "serviceTier\uB97C \uC9C0\uC815\uD55C \uBAA8\uB378\uC740 providerModelId\uB3C4 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4",
|
|
19493
|
-
path: ["serviceTier"]
|
|
19494
|
-
});
|
|
19495
|
-
}
|
|
19496
|
-
});
|
|
19497
|
-
var ProviderSchema = external_exports.object({
|
|
19498
|
-
/** 프로바이더 표시 이름 */
|
|
19499
|
-
name: external_exports.string(),
|
|
19500
|
-
/** 기본 모델 ID */
|
|
19501
|
-
defaultModel: external_exports.string(),
|
|
19502
|
-
/** 사용 가능한 모델 목록 */
|
|
19503
|
-
models: external_exports.array(ModelEntrySchema).min(1)
|
|
19504
|
-
}).check((ctx) => {
|
|
19505
|
-
const ids = new Set(ctx.value.models.map((m) => m.modelId));
|
|
19506
|
-
if (!ids.has(ctx.value.defaultModel)) {
|
|
19507
|
-
ctx.issues.push({
|
|
19508
|
-
code: "custom",
|
|
19509
|
-
input: ctx.value.defaultModel,
|
|
19510
|
-
message: `defaultModel "${ctx.value.defaultModel}"\uC740(\uB294) models \uBAA9\uB85D\uC5D0 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4`,
|
|
19511
|
-
path: ["defaultModel"]
|
|
19512
|
-
});
|
|
19513
|
-
}
|
|
19514
|
-
});
|
|
19515
|
-
var ModelMappingSchema = external_exports.record(external_exports.string(), external_exports.string());
|
|
19516
|
-
var ModelsMapperEntrySchema = external_exports.object({
|
|
19517
|
-
/** modelId와 연관된 매핑 모델 */
|
|
19518
|
-
modelMapping: ModelMappingSchema,
|
|
19519
|
-
/** 추가 환경변수 (선택) */
|
|
19520
|
-
env: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
19521
|
-
});
|
|
19522
|
-
external_exports.record(external_exports.string(), ModelsMapperEntrySchema);
|
|
19523
|
-
var ModelsRegistrySchema = external_exports.object({
|
|
19524
|
-
/** 스키마 버전 */
|
|
19525
|
-
version: external_exports.number().int().positive(),
|
|
19526
|
-
/** 최종 업데이트 시각 */
|
|
19527
|
-
updatedAt: external_exports.string(),
|
|
19528
|
-
/** 프로바이더별 모델 정보 */
|
|
19529
|
-
providers: external_exports.record(external_exports.string(), ProviderSchema)
|
|
19530
|
-
});
|
|
19531
|
-
|
|
19532
|
-
// ../../packages/core-unified-agent/src/models/ModelRegistry.ts
|
|
19533
|
-
var registry2 = Object.freeze(ModelsRegistrySchema.parse(models_default));
|
|
19534
|
-
function getProviderModels(cli) {
|
|
19535
|
-
const provider = registry2.providers[cli];
|
|
19536
|
-
if (!provider) {
|
|
19537
|
-
throw new Error(`\uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uBC14\uC774\uB354: "${cli}"`);
|
|
19538
|
-
}
|
|
19539
|
-
return structuredClone(provider);
|
|
19540
|
-
}
|
|
19541
|
-
function getCursorSpawnEffortInfo(modelId) {
|
|
19542
|
-
const model = findProviderModel("cursor", modelId);
|
|
19543
|
-
if (!model.spawnModelTemplate || !model.effort.supported) {
|
|
19544
|
-
return { supported: false, levels: [], default: null };
|
|
19545
|
-
}
|
|
19546
|
-
return {
|
|
19547
|
-
supported: true,
|
|
19548
|
-
levels: [...model.effort.levels],
|
|
19549
|
-
default: model.effort.default
|
|
19550
|
-
};
|
|
19551
|
-
}
|
|
19552
|
-
function resolveCursorSpawnModel(modelId, effort) {
|
|
19553
|
-
const model = findProviderModel("cursor", modelId);
|
|
19554
|
-
if (!model.spawnModelTemplate) {
|
|
19555
|
-
return model.modelId;
|
|
19556
|
-
}
|
|
19557
|
-
if (!model.effort.supported) {
|
|
19558
|
-
return model.spawnModelTemplate;
|
|
19559
|
-
}
|
|
19560
|
-
const level = effort ?? model.effort.default;
|
|
19561
|
-
const resolvedLevel = model.effort.levels.includes(level) ? level : model.effort.default;
|
|
19562
|
-
if (!model.effort.levels.includes(resolvedLevel)) {
|
|
19563
|
-
throw new Error(
|
|
19564
|
-
`cursor/${modelId} \uBAA8\uB378\uC740 effort "${level}"\uC744(\uB97C) \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9 \uAC00\uB2A5: ${model.effort.levels.join(", ")}`
|
|
19565
|
-
);
|
|
19566
|
-
}
|
|
19567
|
-
return model.spawnModelTemplate.replace("{effort}", resolvedLevel);
|
|
19568
|
-
}
|
|
19569
|
-
function findProviderModel(cli, modelId) {
|
|
19570
|
-
const provider = registry2.providers[cli];
|
|
19571
|
-
if (!provider) {
|
|
19572
|
-
throw new Error(`\uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uBC14\uC774\uB354: "${cli}"`);
|
|
19573
|
-
}
|
|
19574
|
-
const model = provider.models.find((m) => m.modelId === modelId);
|
|
19575
|
-
if (!model) {
|
|
19576
|
-
throw new Error(`\uC54C \uC218 \uC5C6\uB294 \uBAA8\uB378: "${cli}/${modelId}"`);
|
|
19577
|
-
}
|
|
19578
|
-
return model;
|
|
19579
|
-
}
|
|
19580
|
-
|
|
19581
19362
|
// ../../packages/core-unified-agent/src/config/CliConfigs.ts
|
|
19582
19363
|
var CLI_BACKENDS = {
|
|
19583
19364
|
claude: {
|
|
@@ -19613,21 +19394,6 @@ var CLI_BACKENDS = {
|
|
|
19613
19394
|
requiresModelAtSpawn: false,
|
|
19614
19395
|
usesNpxBridge: false,
|
|
19615
19396
|
defaultMaxTokens: 1e5
|
|
19616
|
-
},
|
|
19617
|
-
cursor: {
|
|
19618
|
-
id: "cursor",
|
|
19619
|
-
cliCommand: "cursor-agent",
|
|
19620
|
-
protocol: "acp",
|
|
19621
|
-
authRequired: true,
|
|
19622
|
-
acpArgs: ["acp"],
|
|
19623
|
-
modes: [
|
|
19624
|
-
{ id: "agent", label: "Agent" }
|
|
19625
|
-
],
|
|
19626
|
-
supportsSessionClose: false,
|
|
19627
|
-
supportsSessionLoad: true,
|
|
19628
|
-
requiresModelAtSpawn: true,
|
|
19629
|
-
usesNpxBridge: false,
|
|
19630
|
-
defaultMaxTokens: 2e5
|
|
19631
19397
|
}
|
|
19632
19398
|
};
|
|
19633
19399
|
function createSpawnConfig(cli, options) {
|
|
@@ -19658,9 +19424,6 @@ function createSpawnConfig(cli, options) {
|
|
|
19658
19424
|
}
|
|
19659
19425
|
const command = options.cliPath ?? backend.cliCommand;
|
|
19660
19426
|
const args = backend.acpArgs ? [...backend.acpArgs] : [];
|
|
19661
|
-
if (cli === "cursor" && options.model) {
|
|
19662
|
-
args.unshift("--model", resolveCursorSpawnModel(options.model, options.effort));
|
|
19663
|
-
}
|
|
19664
19427
|
return {
|
|
19665
19428
|
command,
|
|
19666
19429
|
args,
|
|
@@ -19674,8 +19437,6 @@ function getYoloModeId(cli) {
|
|
|
19674
19437
|
switch (cli) {
|
|
19675
19438
|
case "claude":
|
|
19676
19439
|
return "bypassPermissions";
|
|
19677
|
-
case "cursor":
|
|
19678
|
-
return "agent";
|
|
19679
19440
|
case "codex":
|
|
19680
19441
|
return "yolo";
|
|
19681
19442
|
}
|
|
@@ -19874,25 +19635,156 @@ var CliDetector = class {
|
|
|
19874
19635
|
}
|
|
19875
19636
|
};
|
|
19876
19637
|
|
|
19877
|
-
// ../../packages/core-unified-agent/
|
|
19878
|
-
var
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19638
|
+
// ../../packages/core-unified-agent/models.json
|
|
19639
|
+
var models_default = {
|
|
19640
|
+
version: 1,
|
|
19641
|
+
updatedAt: "2026-07-25T00:00:00Z",
|
|
19642
|
+
providers: {
|
|
19643
|
+
claude: {
|
|
19644
|
+
name: "Claude Code",
|
|
19645
|
+
defaultModel: "opus[1m]",
|
|
19646
|
+
models: [
|
|
19647
|
+
{ modelId: "haiku", name: "Claude Haiku", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "low" } },
|
|
19648
|
+
{ modelId: "sonnet", name: "Claude Sonnet", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19649
|
+
{ modelId: "opus", name: "Claude Opus", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19650
|
+
{ modelId: "opus[1m]", name: "Claude Opus [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19651
|
+
{ modelId: "claude-opus-4-6[1m]", name: "Claude Opus 4.6 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19652
|
+
{ modelId: "claude-opus-4-7[1m]", name: "Claude Opus 4.7 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19653
|
+
{ modelId: "claude-opus-4-8[1m]", name: "Claude Opus 4.8 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } }
|
|
19654
|
+
]
|
|
19655
|
+
},
|
|
19656
|
+
codex: {
|
|
19657
|
+
name: "Codex",
|
|
19658
|
+
defaultModel: "gpt-5.6-sol",
|
|
19659
|
+
models: [
|
|
19660
|
+
{ modelId: "gpt-5.6-sol", name: "GPT-5.6-Sol", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "low" } },
|
|
19661
|
+
{ modelId: "gpt-5.6-sol-fast", name: "GPT-5.6-Sol Fast", providerModelId: "gpt-5.6-sol", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "low" } },
|
|
19662
|
+
{ modelId: "gpt-5.6-terra", name: "GPT-5.6-Terra", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "medium" } },
|
|
19663
|
+
{ modelId: "gpt-5.6-terra-fast", name: "GPT-5.6-Terra Fast", providerModelId: "gpt-5.6-terra", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "medium" } },
|
|
19664
|
+
{ modelId: "gpt-5.6-luna", name: "GPT-5.6-Luna", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19665
|
+
{ modelId: "gpt-5.6-luna-fast", name: "GPT-5.6-Luna Fast", providerModelId: "gpt-5.6-luna", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19666
|
+
{ modelId: "gpt-5.5", name: "GPT-5.5", effort: { supported: true, levels: ["low", "medium", "high", "xhigh"], default: "high" } },
|
|
19667
|
+
{ modelId: "gpt-5.5-fast", name: "GPT-5.5 Fast", providerModelId: "gpt-5.5", serviceTier: "priority", effort: { supported: true, levels: ["low", "medium", "high", "xhigh"], default: "high" } }
|
|
19668
|
+
]
|
|
19669
|
+
}
|
|
19893
19670
|
}
|
|
19894
|
-
|
|
19895
|
-
|
|
19671
|
+
};
|
|
19672
|
+
|
|
19673
|
+
// ../../packages/core-unified-agent/src/models/registry.ts
|
|
19674
|
+
var EffortLevelSchema = external_exports.enum([
|
|
19675
|
+
"low",
|
|
19676
|
+
"medium",
|
|
19677
|
+
"high",
|
|
19678
|
+
"xhigh",
|
|
19679
|
+
"max",
|
|
19680
|
+
"ultra"
|
|
19681
|
+
]);
|
|
19682
|
+
var EffortSchema = external_exports.union([
|
|
19683
|
+
external_exports.object({
|
|
19684
|
+
supported: external_exports.literal(true),
|
|
19685
|
+
levels: external_exports.array(EffortLevelSchema).min(1),
|
|
19686
|
+
default: EffortLevelSchema
|
|
19687
|
+
}).strict(),
|
|
19688
|
+
external_exports.object({
|
|
19689
|
+
supported: external_exports.literal(false)
|
|
19690
|
+
}).strict()
|
|
19691
|
+
]);
|
|
19692
|
+
var ModelEntrySchema = external_exports.object({
|
|
19693
|
+
/** 모델 고유 식별자 (session/set_model에 전달되는 값) */
|
|
19694
|
+
modelId: external_exports.string(),
|
|
19695
|
+
/** 사람이 읽을 수 있는 모델 이름 */
|
|
19696
|
+
name: external_exports.string(),
|
|
19697
|
+
/** 모델 설명 (선택) */
|
|
19698
|
+
description: external_exports.string().optional(),
|
|
19699
|
+
/** 카탈로그 ID와 실제 provider 모델 ID가 다른 경우의 원본 모델 ID */
|
|
19700
|
+
providerModelId: external_exports.string().optional(),
|
|
19701
|
+
/** provider가 모델과 별도로 받는 서비스 티어 */
|
|
19702
|
+
serviceTier: external_exports.string().optional(),
|
|
19703
|
+
/** 모델의 컨텍스트 윈도우 크기 (토큰) */
|
|
19704
|
+
contextWindow: external_exports.number().int().positive().optional(),
|
|
19705
|
+
/** 모델별 effort 설정 */
|
|
19706
|
+
effort: EffortSchema
|
|
19707
|
+
}).check((ctx) => {
|
|
19708
|
+
const effort = ctx.value.effort;
|
|
19709
|
+
if (effort.supported && !effort.levels.includes(effort.default)) {
|
|
19710
|
+
ctx.issues.push({
|
|
19711
|
+
code: "custom",
|
|
19712
|
+
input: effort.default,
|
|
19713
|
+
message: `effort.default "${effort.default}"\uC740(\uB294) levels \uBAA9\uB85D\uC5D0 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4`,
|
|
19714
|
+
path: ["effort", "default"]
|
|
19715
|
+
});
|
|
19716
|
+
}
|
|
19717
|
+
if (ctx.value.serviceTier && !ctx.value.providerModelId) {
|
|
19718
|
+
ctx.issues.push({
|
|
19719
|
+
code: "custom",
|
|
19720
|
+
input: ctx.value.serviceTier,
|
|
19721
|
+
message: "serviceTier\uB97C \uC9C0\uC815\uD55C \uBAA8\uB378\uC740 providerModelId\uB3C4 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4",
|
|
19722
|
+
path: ["serviceTier"]
|
|
19723
|
+
});
|
|
19724
|
+
}
|
|
19725
|
+
});
|
|
19726
|
+
var ProviderSchema = external_exports.object({
|
|
19727
|
+
/** 프로바이더 표시 이름 */
|
|
19728
|
+
name: external_exports.string(),
|
|
19729
|
+
/** 기본 모델 ID */
|
|
19730
|
+
defaultModel: external_exports.string(),
|
|
19731
|
+
/** 사용 가능한 모델 목록 */
|
|
19732
|
+
models: external_exports.array(ModelEntrySchema).min(1)
|
|
19733
|
+
}).check((ctx) => {
|
|
19734
|
+
const ids = new Set(ctx.value.models.map((m) => m.modelId));
|
|
19735
|
+
if (!ids.has(ctx.value.defaultModel)) {
|
|
19736
|
+
ctx.issues.push({
|
|
19737
|
+
code: "custom",
|
|
19738
|
+
input: ctx.value.defaultModel,
|
|
19739
|
+
message: `defaultModel "${ctx.value.defaultModel}"\uC740(\uB294) models \uBAA9\uB85D\uC5D0 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4`,
|
|
19740
|
+
path: ["defaultModel"]
|
|
19741
|
+
});
|
|
19742
|
+
}
|
|
19743
|
+
});
|
|
19744
|
+
var ModelMappingSchema = external_exports.record(external_exports.string(), external_exports.string());
|
|
19745
|
+
var ModelsMapperEntrySchema = external_exports.object({
|
|
19746
|
+
/** modelId와 연관된 매핑 모델 */
|
|
19747
|
+
modelMapping: ModelMappingSchema,
|
|
19748
|
+
/** 추가 환경변수 (선택) */
|
|
19749
|
+
env: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
19750
|
+
});
|
|
19751
|
+
external_exports.record(external_exports.string(), ModelsMapperEntrySchema);
|
|
19752
|
+
var ModelsRegistrySchema = external_exports.object({
|
|
19753
|
+
/** 스키마 버전 */
|
|
19754
|
+
version: external_exports.number().int().positive(),
|
|
19755
|
+
/** 최종 업데이트 시각 */
|
|
19756
|
+
updatedAt: external_exports.string(),
|
|
19757
|
+
/** 프로바이더별 모델 정보 */
|
|
19758
|
+
providers: external_exports.record(external_exports.string(), ProviderSchema)
|
|
19759
|
+
});
|
|
19760
|
+
var registry2 = Object.freeze(ModelsRegistrySchema.parse(models_default));
|
|
19761
|
+
function getProviderModels(cli) {
|
|
19762
|
+
const provider = registry2.providers[cli];
|
|
19763
|
+
if (!provider) {
|
|
19764
|
+
throw new Error(`\uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uBC14\uC774\uB354: "${cli}"`);
|
|
19765
|
+
}
|
|
19766
|
+
return structuredClone(provider);
|
|
19767
|
+
}
|
|
19768
|
+
|
|
19769
|
+
// ../../packages/core-unified-agent/src/client/UnifiedClaudeAgentClient.ts
|
|
19770
|
+
var UnifiedClaudeAgentClient = class extends EventEmitter {
|
|
19771
|
+
connection = null;
|
|
19772
|
+
sessionId = null;
|
|
19773
|
+
sessionCwd = null;
|
|
19774
|
+
currentSystemPrompt = null;
|
|
19775
|
+
currentSystemPromptMode = "prepend";
|
|
19776
|
+
firstPromptPending = null;
|
|
19777
|
+
currentEffort = null;
|
|
19778
|
+
detector = new CliDetector();
|
|
19779
|
+
cliType = "claude";
|
|
19780
|
+
on(event, listener) {
|
|
19781
|
+
return super.on(event, listener);
|
|
19782
|
+
}
|
|
19783
|
+
once(event, listener) {
|
|
19784
|
+
return super.once(event, listener);
|
|
19785
|
+
}
|
|
19786
|
+
off(event, listener) {
|
|
19787
|
+
return super.off(event, listener);
|
|
19896
19788
|
}
|
|
19897
19789
|
emitTyped(event, ...args) {
|
|
19898
19790
|
return super.emit(event, ...args);
|
|
@@ -21605,453 +21497,6 @@ var UnifiedCodexAgentClient = class extends EventEmitter {
|
|
|
21605
21497
|
};
|
|
21606
21498
|
}
|
|
21607
21499
|
};
|
|
21608
|
-
var UnifiedCursorAgentClient = class extends EventEmitter {
|
|
21609
|
-
connection = null;
|
|
21610
|
-
sessionId = null;
|
|
21611
|
-
sessionCwd = null;
|
|
21612
|
-
currentSystemPrompt = null;
|
|
21613
|
-
firstPromptPending = null;
|
|
21614
|
-
currentConnectOptions = null;
|
|
21615
|
-
detector = new CliDetector();
|
|
21616
|
-
on(event, listener) {
|
|
21617
|
-
return super.on(event, listener);
|
|
21618
|
-
}
|
|
21619
|
-
once(event, listener) {
|
|
21620
|
-
return super.once(event, listener);
|
|
21621
|
-
}
|
|
21622
|
-
off(event, listener) {
|
|
21623
|
-
return super.off(event, listener);
|
|
21624
|
-
}
|
|
21625
|
-
emitTyped(event, ...args) {
|
|
21626
|
-
return super.emit(event, ...args);
|
|
21627
|
-
}
|
|
21628
|
-
async connect(options) {
|
|
21629
|
-
await this.disconnect();
|
|
21630
|
-
if (options.cli && options.cli !== "cursor") {
|
|
21631
|
-
throw new Error("UnifiedCursorAgentClient\uB294 cursor CLI\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4.");
|
|
21632
|
-
}
|
|
21633
|
-
const acpMcpServers = this.resolveMcpServers(options.mcpServers);
|
|
21634
|
-
const spawnConfig = createSpawnConfig("cursor", options);
|
|
21635
|
-
const cleanEnv = cleanEnvironment(process.env, options.env);
|
|
21636
|
-
const env = { ...cleanEnv };
|
|
21637
|
-
const connection = new AcpConnection({
|
|
21638
|
-
command: spawnConfig.command,
|
|
21639
|
-
args: spawnConfig.args,
|
|
21640
|
-
cliType: "cursor",
|
|
21641
|
-
cwd: options.cwd,
|
|
21642
|
-
env,
|
|
21643
|
-
requestTimeout: options.timeout,
|
|
21644
|
-
initTimeout: options.timeout,
|
|
21645
|
-
promptIdleTimeout: options.promptIdleTimeout,
|
|
21646
|
-
clientInfo: options.clientInfo,
|
|
21647
|
-
autoApprove: options.autoApprove,
|
|
21648
|
-
fsAccess: options.fsAccess
|
|
21649
|
-
});
|
|
21650
|
-
this.connection = connection;
|
|
21651
|
-
this.setupEventForwarding();
|
|
21652
|
-
const recentLogs = [];
|
|
21653
|
-
const collectLog = (message) => {
|
|
21654
|
-
recentLogs.push(message);
|
|
21655
|
-
if (recentLogs.length > 30) {
|
|
21656
|
-
recentLogs.shift();
|
|
21657
|
-
}
|
|
21658
|
-
};
|
|
21659
|
-
connection.on("log", collectLog);
|
|
21660
|
-
let session;
|
|
21661
|
-
try {
|
|
21662
|
-
session = await connection.connect(
|
|
21663
|
-
options.cwd,
|
|
21664
|
-
options.sessionId,
|
|
21665
|
-
acpMcpServers,
|
|
21666
|
-
options.systemPrompt
|
|
21667
|
-
);
|
|
21668
|
-
} catch (error51) {
|
|
21669
|
-
const connectionError = this.buildConnectionError(error51, recentLogs);
|
|
21670
|
-
await this.cleanupFailedConnection();
|
|
21671
|
-
throw connectionError;
|
|
21672
|
-
} finally {
|
|
21673
|
-
connection.off("log", collectLog);
|
|
21674
|
-
}
|
|
21675
|
-
return this.finalizeConnect(options, session);
|
|
21676
|
-
}
|
|
21677
|
-
async disconnect() {
|
|
21678
|
-
if (!this.connection) {
|
|
21679
|
-
this.clearSessionState();
|
|
21680
|
-
return;
|
|
21681
|
-
}
|
|
21682
|
-
const conn = this.connection;
|
|
21683
|
-
if (this.sessionId && conn.canResetSession) {
|
|
21684
|
-
try {
|
|
21685
|
-
await conn.endSession(this.sessionId);
|
|
21686
|
-
} catch {
|
|
21687
|
-
}
|
|
21688
|
-
}
|
|
21689
|
-
await conn.disconnect();
|
|
21690
|
-
conn.removeAllListeners();
|
|
21691
|
-
this.connection = null;
|
|
21692
|
-
this.clearSessionState();
|
|
21693
|
-
}
|
|
21694
|
-
async endSession() {
|
|
21695
|
-
if (!this.connection || !this.sessionId) {
|
|
21696
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21697
|
-
}
|
|
21698
|
-
await this.connection.endSession(this.sessionId);
|
|
21699
|
-
this.sessionId = null;
|
|
21700
|
-
}
|
|
21701
|
-
getConnectionInfo() {
|
|
21702
|
-
return {
|
|
21703
|
-
cli: this.connection ? "cursor" : null,
|
|
21704
|
-
protocol: this.connection ? "acp" : null,
|
|
21705
|
-
sessionId: this.sessionId,
|
|
21706
|
-
state: this.connection ? this.connection.connectionState : "disconnected"
|
|
21707
|
-
};
|
|
21708
|
-
}
|
|
21709
|
-
async detectClis() {
|
|
21710
|
-
return this.detector.detectAll(true);
|
|
21711
|
-
}
|
|
21712
|
-
async sendMessage(content) {
|
|
21713
|
-
if (!this.connection || !this.sessionId) {
|
|
21714
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21715
|
-
}
|
|
21716
|
-
const systemPrompt = this.firstPromptPending;
|
|
21717
|
-
if (!systemPrompt) {
|
|
21718
|
-
return this.connection.sendPrompt(this.sessionId, content);
|
|
21719
|
-
}
|
|
21720
|
-
const userBlocks = typeof content === "string" ? [{ type: "text", text: content }] : content;
|
|
21721
|
-
const response = await this.connection.sendPrompt(this.sessionId, [
|
|
21722
|
-
{ type: "text", text: systemPrompt },
|
|
21723
|
-
...userBlocks
|
|
21724
|
-
]);
|
|
21725
|
-
this.firstPromptPending = null;
|
|
21726
|
-
return response;
|
|
21727
|
-
}
|
|
21728
|
-
async cancelPrompt() {
|
|
21729
|
-
if (!this.connection || !this.sessionId) {
|
|
21730
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21731
|
-
}
|
|
21732
|
-
await this.connection.cancelSession(this.sessionId);
|
|
21733
|
-
}
|
|
21734
|
-
async setModel(model) {
|
|
21735
|
-
if (!this.connection || !this.sessionId) {
|
|
21736
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21737
|
-
}
|
|
21738
|
-
const reconnectOptions = this.buildReconnectOptions(model);
|
|
21739
|
-
await this.reconnectWithRestore(reconnectOptions, "\uBAA8\uB378 \uBCC0\uACBD");
|
|
21740
|
-
}
|
|
21741
|
-
async setConfigOption(configId, value) {
|
|
21742
|
-
if (!this.connection || !this.sessionId) {
|
|
21743
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21744
|
-
}
|
|
21745
|
-
if (configId === "effort" || configId === "reasoning_effort") {
|
|
21746
|
-
const reconnectOptions = this.buildEffortReconnectOptions(value);
|
|
21747
|
-
if (!reconnectOptions) {
|
|
21748
|
-
return;
|
|
21749
|
-
}
|
|
21750
|
-
await this.reconnectWithRestore(reconnectOptions, "effort \uBCC0\uACBD");
|
|
21751
|
-
return;
|
|
21752
|
-
}
|
|
21753
|
-
if (configId === "model") {
|
|
21754
|
-
return this.setModel(value);
|
|
21755
|
-
}
|
|
21756
|
-
await this.connection.setConfigOption(this.sessionId, configId, value);
|
|
21757
|
-
}
|
|
21758
|
-
async setMode(mode) {
|
|
21759
|
-
if (!this.connection || !this.sessionId) {
|
|
21760
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21761
|
-
}
|
|
21762
|
-
await this.connection.setMode(this.sessionId, mode);
|
|
21763
|
-
}
|
|
21764
|
-
async setYoloMode(enabled) {
|
|
21765
|
-
return this.setMode(enabled ? getYoloModeId("cursor") : "default");
|
|
21766
|
-
}
|
|
21767
|
-
getAvailableModes() {
|
|
21768
|
-
return getBackendConfig("cursor").modes ?? [];
|
|
21769
|
-
}
|
|
21770
|
-
getAvailableModels() {
|
|
21771
|
-
return getProviderModels("cursor");
|
|
21772
|
-
}
|
|
21773
|
-
getCurrentSystemPrompt() {
|
|
21774
|
-
return this.currentSystemPrompt;
|
|
21775
|
-
}
|
|
21776
|
-
async loadSession(sessionId, mcpServers) {
|
|
21777
|
-
if (!this.connection) {
|
|
21778
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21779
|
-
}
|
|
21780
|
-
await this.connection.loadSession({
|
|
21781
|
-
sessionId,
|
|
21782
|
-
cwd: this.sessionCwd ?? process.cwd(),
|
|
21783
|
-
mcpServers: this.resolveMcpServers(mcpServers)
|
|
21784
|
-
});
|
|
21785
|
-
this.sessionId = sessionId;
|
|
21786
|
-
this.currentSystemPrompt = null;
|
|
21787
|
-
this.firstPromptPending = null;
|
|
21788
|
-
}
|
|
21789
|
-
async resetSession(cwd) {
|
|
21790
|
-
if (!this.connection || !this.sessionId) {
|
|
21791
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21792
|
-
}
|
|
21793
|
-
const targetCwd = cwd ?? this.sessionCwd ?? process.cwd();
|
|
21794
|
-
if (!this.connection.canResetSession) {
|
|
21795
|
-
throw new Error("[cursor] \uC138\uC158 \uB9AC\uC14B\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. disconnect() \uD6C4 \uC7AC\uC5F0\uACB0\uD558\uC138\uC694.");
|
|
21796
|
-
}
|
|
21797
|
-
await this.connection.endSession(this.sessionId);
|
|
21798
|
-
this.sessionId = null;
|
|
21799
|
-
const session = this.currentSystemPrompt ? await this.connection.reconnectSession(
|
|
21800
|
-
targetCwd,
|
|
21801
|
-
void 0,
|
|
21802
|
-
void 0,
|
|
21803
|
-
this.currentSystemPrompt
|
|
21804
|
-
) : await this.connection.reconnectSession(targetCwd);
|
|
21805
|
-
this.sessionId = session.sessionId;
|
|
21806
|
-
this.sessionCwd = targetCwd;
|
|
21807
|
-
this.firstPromptPending = this.currentSystemPrompt;
|
|
21808
|
-
return {
|
|
21809
|
-
cli: "cursor",
|
|
21810
|
-
protocol: "acp",
|
|
21811
|
-
session
|
|
21812
|
-
};
|
|
21813
|
-
}
|
|
21814
|
-
resolveMcpServers(servers) {
|
|
21815
|
-
return servers?.length ? mcpServerConfigsToAcp(servers) : [];
|
|
21816
|
-
}
|
|
21817
|
-
async finalizeConnect(options, session) {
|
|
21818
|
-
if (options.yoloMode && session.sessionId) {
|
|
21819
|
-
try {
|
|
21820
|
-
await this.connection.setMode(session.sessionId, getYoloModeId("cursor"));
|
|
21821
|
-
} catch {
|
|
21822
|
-
}
|
|
21823
|
-
}
|
|
21824
|
-
this.sessionId = session.sessionId;
|
|
21825
|
-
this.sessionCwd = options.cwd;
|
|
21826
|
-
this.currentSystemPrompt = options.systemPrompt ?? null;
|
|
21827
|
-
this.firstPromptPending = options.sessionId ? null : this.currentSystemPrompt;
|
|
21828
|
-
this.currentConnectOptions = this.cloneConnectOptions(options);
|
|
21829
|
-
return {
|
|
21830
|
-
cli: "cursor",
|
|
21831
|
-
protocol: "acp",
|
|
21832
|
-
session
|
|
21833
|
-
};
|
|
21834
|
-
}
|
|
21835
|
-
clearSessionState() {
|
|
21836
|
-
this.sessionId = null;
|
|
21837
|
-
this.sessionCwd = null;
|
|
21838
|
-
this.currentSystemPrompt = null;
|
|
21839
|
-
this.firstPromptPending = null;
|
|
21840
|
-
this.currentConnectOptions = null;
|
|
21841
|
-
}
|
|
21842
|
-
buildReconnectOptions(model) {
|
|
21843
|
-
if (!this.currentConnectOptions) {
|
|
21844
|
-
throw new Error("[cursor] \uBAA8\uB378 \uC804\uD658\uC744 \uC704\uD55C \uAE30\uC874 \uC5F0\uACB0 \uC635\uC158\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. connect()\uB85C \uB2E4\uC2DC \uC5F0\uACB0\uD558\uC138\uC694.");
|
|
21845
|
-
}
|
|
21846
|
-
const options = this.cloneConnectOptions(this.currentConnectOptions);
|
|
21847
|
-
const effort = this.resolveEffortForModel(model, options.effort);
|
|
21848
|
-
delete options.sessionId;
|
|
21849
|
-
if (effort) {
|
|
21850
|
-
options.effort = effort;
|
|
21851
|
-
} else {
|
|
21852
|
-
delete options.effort;
|
|
21853
|
-
}
|
|
21854
|
-
return {
|
|
21855
|
-
...options,
|
|
21856
|
-
cli: "cursor",
|
|
21857
|
-
model
|
|
21858
|
-
};
|
|
21859
|
-
}
|
|
21860
|
-
buildEffortReconnectOptions(effort) {
|
|
21861
|
-
if (!this.currentConnectOptions) {
|
|
21862
|
-
throw new Error("[cursor] effort \uC804\uD658\uC744 \uC704\uD55C \uAE30\uC874 \uC5F0\uACB0 \uC635\uC158\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. connect()\uB85C \uB2E4\uC2DC \uC5F0\uACB0\uD558\uC138\uC694.");
|
|
21863
|
-
}
|
|
21864
|
-
if (!this.currentConnectOptions.model) {
|
|
21865
|
-
throw new Error("[cursor] effort \uC804\uD658\uC744 \uC704\uD55C \uD604\uC7AC \uBAA8\uB378 \uC815\uBCF4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uBAA8\uB378\uC744 \uC9C0\uC815\uD574 \uB2E4\uC2DC \uC5F0\uACB0\uD558\uC138\uC694.");
|
|
21866
|
-
}
|
|
21867
|
-
if (this.currentConnectOptions.effort === effort) {
|
|
21868
|
-
return null;
|
|
21869
|
-
}
|
|
21870
|
-
const effortInfo = getCursorSpawnEffortInfo(this.currentConnectOptions.model);
|
|
21871
|
-
if (!effortInfo.supported) {
|
|
21872
|
-
return null;
|
|
21873
|
-
}
|
|
21874
|
-
if (!effortInfo.levels.includes(effort)) {
|
|
21875
|
-
throw new Error(
|
|
21876
|
-
`[cursor] ${this.currentConnectOptions.model} \uBAA8\uB378\uC740 effort "${effort}"\uC744(\uB97C) \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9 \uAC00\uB2A5: ${effortInfo.levels.join(", ")}`
|
|
21877
|
-
);
|
|
21878
|
-
}
|
|
21879
|
-
const options = this.cloneConnectOptions(this.currentConnectOptions);
|
|
21880
|
-
delete options.sessionId;
|
|
21881
|
-
return {
|
|
21882
|
-
...options,
|
|
21883
|
-
cli: "cursor",
|
|
21884
|
-
effort
|
|
21885
|
-
};
|
|
21886
|
-
}
|
|
21887
|
-
resolveEffortForModel(model, effort) {
|
|
21888
|
-
const effortInfo = getCursorSpawnEffortInfo(model);
|
|
21889
|
-
if (!effortInfo.supported) {
|
|
21890
|
-
return void 0;
|
|
21891
|
-
}
|
|
21892
|
-
if (effort && effortInfo.levels.includes(effort)) {
|
|
21893
|
-
return effort;
|
|
21894
|
-
}
|
|
21895
|
-
return effortInfo.default ?? void 0;
|
|
21896
|
-
}
|
|
21897
|
-
async reconnectWithRestore(nextOptions, label) {
|
|
21898
|
-
if (!this.currentConnectOptions) {
|
|
21899
|
-
throw new Error(`[cursor] ${label}\uC744 \uC704\uD55C \uAE30\uC874 \uC5F0\uACB0 \uC635\uC158\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. connect()\uB85C \uB2E4\uC2DC \uC5F0\uACB0\uD558\uC138\uC694.`);
|
|
21900
|
-
}
|
|
21901
|
-
const previousOptions = this.cloneConnectOptions(this.currentConnectOptions);
|
|
21902
|
-
try {
|
|
21903
|
-
await this.connect(nextOptions);
|
|
21904
|
-
} catch (error51) {
|
|
21905
|
-
try {
|
|
21906
|
-
await this.connect(previousOptions);
|
|
21907
|
-
} catch (restoreError) {
|
|
21908
|
-
throw new Error(
|
|
21909
|
-
`[cursor] ${label} \uC2E4\uD328 \uD6C4 \uC774\uC804 \uC5F0\uACB0 \uBCF5\uAD6C\uB3C4 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. ${label} \uC624\uB958: ${this.formatErrorMessage(error51)} / \uBCF5\uAD6C \uC624\uB958: ${this.formatErrorMessage(restoreError)}`
|
|
21910
|
-
);
|
|
21911
|
-
}
|
|
21912
|
-
throw new Error(
|
|
21913
|
-
`[cursor] ${label} \uC2E4\uD328\uB85C \uC774\uC804 \uC5F0\uACB0\uC744 \uBCF5\uAD6C\uD588\uC2B5\uB2C8\uB2E4. ${label} \uC624\uB958: ${this.formatErrorMessage(error51)}`
|
|
21914
|
-
);
|
|
21915
|
-
}
|
|
21916
|
-
}
|
|
21917
|
-
formatErrorMessage(error51) {
|
|
21918
|
-
if (error51 instanceof Error) {
|
|
21919
|
-
return error51.message;
|
|
21920
|
-
}
|
|
21921
|
-
return String(error51);
|
|
21922
|
-
}
|
|
21923
|
-
cloneConnectOptions(options) {
|
|
21924
|
-
return {
|
|
21925
|
-
...options,
|
|
21926
|
-
cli: "cursor",
|
|
21927
|
-
env: options.env ? { ...options.env } : void 0,
|
|
21928
|
-
clientInfo: options.clientInfo ? { ...options.clientInfo } : void 0,
|
|
21929
|
-
mcpServers: options.mcpServers?.map((server) => ({
|
|
21930
|
-
...server,
|
|
21931
|
-
headers: server.headers?.map((header) => ({ ...header }))
|
|
21932
|
-
}))
|
|
21933
|
-
};
|
|
21934
|
-
}
|
|
21935
|
-
setupEventForwarding() {
|
|
21936
|
-
if (!this.connection) return;
|
|
21937
|
-
this.connection.on("stateChange", (state) => {
|
|
21938
|
-
this.emitTyped("stateChange", state);
|
|
21939
|
-
});
|
|
21940
|
-
this.connection.on("userMessageChunk", (text, sessionId) => {
|
|
21941
|
-
this.emitTyped("userMessageChunk", text, sessionId);
|
|
21942
|
-
});
|
|
21943
|
-
this.connection.on("messageChunk", (text, sessionId) => {
|
|
21944
|
-
this.emitTyped("messageChunk", text, sessionId);
|
|
21945
|
-
});
|
|
21946
|
-
this.connection.on("thoughtChunk", (text, sessionId) => {
|
|
21947
|
-
this.emitTyped("thoughtChunk", text, sessionId);
|
|
21948
|
-
});
|
|
21949
|
-
this.connection.on("toolCall", (title, status, sessionId, data) => {
|
|
21950
|
-
this.emitTyped("toolCall", title, status, sessionId, data);
|
|
21951
|
-
});
|
|
21952
|
-
this.connection.on("toolCallUpdate", (title, status, sessionId, data) => {
|
|
21953
|
-
this.emitTyped("toolCallUpdate", title, status, sessionId, data);
|
|
21954
|
-
});
|
|
21955
|
-
this.connection.on("plan", (plan, sessionId) => {
|
|
21956
|
-
this.emitTyped("plan", plan, sessionId);
|
|
21957
|
-
});
|
|
21958
|
-
this.connection.on("availableCommandsUpdate", (commands, sessionId) => {
|
|
21959
|
-
this.emitTyped("availableCommandsUpdate", commands, sessionId);
|
|
21960
|
-
});
|
|
21961
|
-
this.connection.on("sessionUpdate", (update) => {
|
|
21962
|
-
this.emitTyped("sessionUpdate", update);
|
|
21963
|
-
});
|
|
21964
|
-
this.connection.on("permissionRequest", (params, resolve) => {
|
|
21965
|
-
this.emitTyped("permissionRequest", params, resolve);
|
|
21966
|
-
});
|
|
21967
|
-
this.connection.on("fileRead", (params, resolve) => {
|
|
21968
|
-
this.emitTyped("fileRead", params, resolve);
|
|
21969
|
-
});
|
|
21970
|
-
this.connection.on("fileWrite", (params, resolve) => {
|
|
21971
|
-
this.emitTyped("fileWrite", params, resolve);
|
|
21972
|
-
});
|
|
21973
|
-
this.connection.on("promptComplete", (sessionId) => {
|
|
21974
|
-
this.emitTyped("promptComplete", sessionId);
|
|
21975
|
-
});
|
|
21976
|
-
this.connection.on("error", (err) => {
|
|
21977
|
-
this.emitTyped("error", err);
|
|
21978
|
-
});
|
|
21979
|
-
this.connection.on("exit", (code, signal) => {
|
|
21980
|
-
this.emitTyped("exit", code, signal);
|
|
21981
|
-
});
|
|
21982
|
-
this.connection.on("log", (msg) => {
|
|
21983
|
-
this.emitTyped("log", msg);
|
|
21984
|
-
});
|
|
21985
|
-
this.connection.on("logEntry", (entry) => {
|
|
21986
|
-
this.emitTyped("logEntry", entry);
|
|
21987
|
-
});
|
|
21988
|
-
}
|
|
21989
|
-
async cleanupFailedConnection() {
|
|
21990
|
-
if (!this.connection) {
|
|
21991
|
-
return;
|
|
21992
|
-
}
|
|
21993
|
-
try {
|
|
21994
|
-
await this.connection.disconnect();
|
|
21995
|
-
} catch {
|
|
21996
|
-
}
|
|
21997
|
-
this.connection.removeAllListeners();
|
|
21998
|
-
this.connection = null;
|
|
21999
|
-
this.clearSessionState();
|
|
22000
|
-
}
|
|
22001
|
-
buildConnectionError(error51, recentLogs) {
|
|
22002
|
-
if (getBackendConfig("cursor").authRequired && this.isAuthenticationError(error51, recentLogs)) {
|
|
22003
|
-
return new Error(
|
|
22004
|
-
"[cursor] \uC778\uC99D\uC774 \uD544\uC694\uD558\uAC70\uB098 \uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBA3C\uC800 \uD574\uB2F9 CLI\uC5D0\uC11C \uB85C\uADF8\uC778/\uC778\uC99D\uC744 \uC644\uB8CC\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694."
|
|
22005
|
-
);
|
|
22006
|
-
}
|
|
22007
|
-
if (error51 instanceof Error) {
|
|
22008
|
-
return error51;
|
|
22009
|
-
}
|
|
22010
|
-
if (typeof error51 === "object" && error51 !== null) {
|
|
22011
|
-
const obj = error51;
|
|
22012
|
-
if (typeof obj.message === "string") {
|
|
22013
|
-
const code = typeof obj.code === "number" ? ` (code: ${obj.code})` : "";
|
|
22014
|
-
const data = obj.data ? ` \u2014 ${JSON.stringify(obj.data)}` : "";
|
|
22015
|
-
return new Error(`${obj.message}${code}${data}`);
|
|
22016
|
-
}
|
|
22017
|
-
return new Error(JSON.stringify(error51));
|
|
22018
|
-
}
|
|
22019
|
-
return new Error(String(error51));
|
|
22020
|
-
}
|
|
22021
|
-
isAuthenticationError(error51, recentLogs) {
|
|
22022
|
-
const authPatterns = [
|
|
22023
|
-
/auth_required/i,
|
|
22024
|
-
/authentication required/i,
|
|
22025
|
-
/not authenticated/i,
|
|
22026
|
-
/please login/i,
|
|
22027
|
-
/please log in/i,
|
|
22028
|
-
/sign in/i,
|
|
22029
|
-
/reauth/i,
|
|
22030
|
-
/unauthorized/i,
|
|
22031
|
-
/invalid api key/i
|
|
22032
|
-
];
|
|
22033
|
-
if (this.matchAnyPattern(this.extractErrorText(error51), authPatterns)) {
|
|
22034
|
-
return true;
|
|
22035
|
-
}
|
|
22036
|
-
return recentLogs.some((log) => this.matchAnyPattern(log, authPatterns));
|
|
22037
|
-
}
|
|
22038
|
-
extractErrorText(error51) {
|
|
22039
|
-
if (error51 instanceof Error) {
|
|
22040
|
-
const code = error51.code;
|
|
22041
|
-
if (code === -32e3) {
|
|
22042
|
-
return `auth_required ${error51.message}`;
|
|
22043
|
-
}
|
|
22044
|
-
return error51.message;
|
|
22045
|
-
}
|
|
22046
|
-
if (typeof error51 === "string") {
|
|
22047
|
-
return error51;
|
|
22048
|
-
}
|
|
22049
|
-
return String(error51);
|
|
22050
|
-
}
|
|
22051
|
-
matchAnyPattern(text, patterns) {
|
|
22052
|
-
return patterns.some((pattern) => pattern.test(text));
|
|
22053
|
-
}
|
|
22054
|
-
};
|
|
22055
21500
|
|
|
22056
21501
|
// ../../packages/core-unified-agent/src/client/UnifiedAgent.ts
|
|
22057
21502
|
var UnifiedAgent = {
|
|
@@ -22061,8 +21506,6 @@ var UnifiedAgent = {
|
|
|
22061
21506
|
return new UnifiedClaudeAgentClient();
|
|
22062
21507
|
case "codex":
|
|
22063
21508
|
return new UnifiedCodexAgentClient();
|
|
22064
|
-
case "cursor":
|
|
22065
|
-
return new UnifiedCursorAgentClient();
|
|
22066
21509
|
}
|
|
22067
21510
|
},
|
|
22068
21511
|
async build(options = {}) {
|
|
@@ -22075,7 +21518,7 @@ var UnifiedAgent = {
|
|
|
22075
21518
|
const preferred = await new CliDetector().getPreferred();
|
|
22076
21519
|
if (!preferred) {
|
|
22077
21520
|
throw new Error(
|
|
22078
|
-
"\uC0AC\uC6A9 \uAC00\uB2A5\uD55C CLI\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. claude, codex
|
|
21521
|
+
"\uC0AC\uC6A9 \uAC00\uB2A5\uD55C CLI\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. claude, codex \uC911 \uD558\uB098\uB97C \uC124\uCE58\uD574\uC8FC\uC138\uC694."
|
|
22079
21522
|
);
|
|
22080
21523
|
}
|
|
22081
21524
|
return this.createClient(preferred.cli);
|