@dotobokuri/fleet-console 1.45.0 → 1.47.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 +4 -0
- package/dist/cli.mjs +416 -899
- package/dist/client/assets/{_baseUniq-DtJH2bh8.js → _baseUniq-kGlxZURL.js} +1 -1
- package/dist/client/assets/{arc-DHCKMqqF.js → arc-0MFZHiK0.js} +1 -1
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-BOuyINL8.js → architectureDiagram-Q4EWVU46--RIddBvw.js} +1 -1
- package/dist/client/assets/{blockDiagram-DXYQGD6D-cIre3_5n.js → blockDiagram-DXYQGD6D-BeAbiibf.js} +1 -1
- package/dist/client/assets/{c4Diagram-AHTNJAMY-DTX-qjSW.js → c4Diagram-AHTNJAMY-DRkTrRQf.js} +1 -1
- package/dist/client/assets/channel-Ba1lW0bI.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-DiBwpozK.js → chunk-4BX2VUAB-BpSILXNJ.js} +1 -1
- package/dist/client/assets/{chunk-4TB4RGXK-uCZ-B3-y.js → chunk-4TB4RGXK-ghYBwdri.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-CmBu2sf0.js → chunk-55IACEB6-D-DtPH2C.js} +1 -1
- package/dist/client/assets/{chunk-EDXVE4YY-BXpw2VyB.js → chunk-EDXVE4YY-59RlsQG_.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-Cn9sKTn5.js → chunk-FMBD7UC4-Hi26IR8N.js} +1 -1
- package/dist/client/assets/{chunk-OYMX7WX6-BDgH1zlW.js → chunk-OYMX7WX6-BRgJcTlv.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-BOdvRibu.js → chunk-QZHKN3VN-BRc2Mimo.js} +1 -1
- package/dist/client/assets/{chunk-YZCP3GAM-BDIEapcU.js → chunk-YZCP3GAM-CpPUsJ-2.js} +1 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-CrjH2VLS.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-CrjH2VLS.js +1 -0
- package/dist/client/assets/clone-CSapyzZ9.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BVlc3Dad.js → cose-bilkent-S5V4N54A-CU7M4-h6.js} +1 -1
- package/dist/client/assets/{dagre-KV5264BT-raV4BK6w.js → dagre-KV5264BT-DsP2pvSV.js} +1 -1
- package/dist/client/assets/{diagram-5BDNPKRD-BMAh1LJt.js → diagram-5BDNPKRD-BIsHIEFX.js} +1 -1
- package/dist/client/assets/{diagram-G4DWMVQ6-AM5t2f3j.js → diagram-G4DWMVQ6-kszOBtB4.js} +1 -1
- package/dist/client/assets/{diagram-MMDJMWI5-DMw_UwWR.js → diagram-MMDJMWI5-Cn5sUEtw.js} +1 -1
- package/dist/client/assets/{diagram-TYMM5635-CiDAD3e9.js → diagram-TYMM5635-CDdfKXq-.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-D1IXSwFZ.js → erDiagram-SMLLAGMA-CI6i4IOF.js} +1 -1
- package/dist/client/assets/{flowDiagram-DWJPFMVM-pEq1L6HP.js → flowDiagram-DWJPFMVM-7foBBYZ0.js} +1 -1
- package/dist/client/assets/{ganttDiagram-T4ZO3ILL-BAXTU16v.js → ganttDiagram-T4ZO3ILL-BtCT8Kyl.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-PkEvpSio.js → gitGraphDiagram-UUTBAWPF-BnG43YXm.js} +1 -1
- package/dist/client/assets/{graph-OOLam9NE.js → graph-BJfoQM9L.js} +1 -1
- package/dist/client/assets/index-BQvUTYMt.js +482 -0
- package/dist/client/assets/index-DpllFOQw.css +1 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-CcLveXnw.js → infoDiagram-42DDH7IO-fSjQnpO3.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-D-p_eX0W.js → ishikawaDiagram-UXIWVN3A-CikjAzZU.js} +1 -1
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-D81ht6ZY.js → journeyDiagram-VCZTEJTY-CXlhn41B.js} +1 -1
- package/dist/client/assets/{kanban-definition-6JOO6SKY-D8SIIBWy.js → kanban-definition-6JOO6SKY-ZSgxxWjz.js} +1 -1
- package/dist/client/assets/{layout-CeMy87tl.js → layout-Cn9VNxzb.js} +1 -1
- package/dist/client/assets/{linear-C0Txkuhf.js → linear-D-4NsXnb.js} +1 -1
- package/dist/client/assets/{mermaid.core-zdTcCzmD.js → mermaid.core-DIF6Bqhc.js} +4 -4
- package/dist/client/assets/{min-BPp_9Vnv.js → min-BO2TWSJi.js} +1 -1
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-DRJbMf8W.js → mindmap-definition-QFDTVHPH-Bmigbv3o.js} +1 -1
- package/dist/client/assets/{pieDiagram-DEJITSTG-CqPISwE-.js → pieDiagram-DEJITSTG-56EjQ8_u.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-34T5L4WZ-BGLaujDD.js → quadrantDiagram-34T5L4WZ-B-mdpysI.js} +1 -1
- package/dist/client/assets/{requirementDiagram-MS252O5E-DWF6sFQ_.js → requirementDiagram-MS252O5E-C-16L-rK.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-Dv2O23aj.js → sankeyDiagram-XADWPNL6-Dpi8Xvd6.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-FGHM5R23-BXgYtweg.js → sequenceDiagram-FGHM5R23-Bb2L9XDw.js} +1 -1
- package/dist/client/assets/{stateDiagram-FHFEXIEX-COtDK2gC.js → stateDiagram-FHFEXIEX-z1AMjFur.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CKmEKJLy.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-B_-QYLHK.js → timeline-definition-GMOUNBTQ-DHXjAJin.js} +1 -1
- package/dist/client/assets/{vennDiagram-DHZGUBPP-BNVDRgAa.js → vennDiagram-DHZGUBPP-Cw9QDGZk.js} +1 -1
- package/dist/client/assets/{wardley-RL74JXVD-B3XwoW1A.js → wardley-RL74JXVD-CDHq7H5N.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-B6-OKLa-.js → wardleyDiagram-NUSXRM2D-B0P1pItE.js} +1 -1
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-DepfDqrZ.js → xychartDiagram-5P7HB3ND-B5jXRxLe.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/fleet-plugins/ledger/routes.mjs +45 -105
- package/dist/fleet-plugins/quota/routes.mjs +455 -64
- package/dist/fleet-plugins/repository/routes.mjs +26 -9
- package/dist/fleet-plugins/scuttlebutt/routes.mjs +150 -703
- package/dist/fleet-plugins/skills/routes.mjs +45 -105
- package/dist/fleet-plugins/terminal/routes.mjs +1436 -1076
- package/package.json +1 -1
- package/dist/client/assets/channel-BhciS8jR.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-BjRUnHce.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-BjRUnHce.js +0 -1
- package/dist/client/assets/clone-DygBt67n.js +0 -1
- package/dist/client/assets/index-BgHFwZy9.css +0 -1
- package/dist/client/assets/index-CvXOp1di.js +0 -452
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BzCFtEfV.js +0 -1
|
@@ -19359,221 +19359,6 @@ function inferBinName(packageName) {
|
|
|
19359
19359
|
return lastSegment.replace(/@[^@/]+$/, "");
|
|
19360
19360
|
}
|
|
19361
19361
|
|
|
19362
|
-
// ../../packages/core-unified-agent/models.json
|
|
19363
|
-
var models_default = {
|
|
19364
|
-
version: 1,
|
|
19365
|
-
updatedAt: "2026-07-25T00:00:00Z",
|
|
19366
|
-
providers: {
|
|
19367
|
-
claude: {
|
|
19368
|
-
name: "Claude Code",
|
|
19369
|
-
defaultModel: "opus[1m]",
|
|
19370
|
-
models: [
|
|
19371
|
-
{ modelId: "haiku", name: "Claude Haiku", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "low" } },
|
|
19372
|
-
{ modelId: "sonnet", name: "Claude Sonnet", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19373
|
-
{ modelId: "opus", name: "Claude Opus", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19374
|
-
{ modelId: "opus[1m]", name: "Claude Opus [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "xhigh" } },
|
|
19375
|
-
{ modelId: "claude-opus-4-6[1m]", name: "Claude Opus 4.6 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19376
|
-
{ modelId: "claude-opus-4-7[1m]", name: "Claude Opus 4.7 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19377
|
-
{ modelId: "claude-opus-4-8[1m]", name: "Claude Opus 4.8 [1M]", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } }
|
|
19378
|
-
]
|
|
19379
|
-
},
|
|
19380
|
-
codex: {
|
|
19381
|
-
name: "Codex",
|
|
19382
|
-
defaultModel: "gpt-5.6-sol",
|
|
19383
|
-
models: [
|
|
19384
|
-
{ modelId: "gpt-5.6-sol", name: "GPT-5.6-Sol", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "low" } },
|
|
19385
|
-
{ 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" } },
|
|
19386
|
-
{ modelId: "gpt-5.6-terra", name: "GPT-5.6-Terra", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max", "ultra"], default: "medium" } },
|
|
19387
|
-
{ 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" } },
|
|
19388
|
-
{ modelId: "gpt-5.6-luna", name: "GPT-5.6-Luna", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "medium" } },
|
|
19389
|
-
{ 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" } },
|
|
19390
|
-
{ modelId: "gpt-5.5", name: "GPT-5.5", effort: { supported: true, levels: ["low", "medium", "high", "xhigh"], default: "high" } },
|
|
19391
|
-
{ 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" } }
|
|
19392
|
-
]
|
|
19393
|
-
},
|
|
19394
|
-
cursor: {
|
|
19395
|
-
name: "Cursor Agent",
|
|
19396
|
-
defaultModel: "auto",
|
|
19397
|
-
models: [
|
|
19398
|
-
{ modelId: "auto", name: "Auto", effort: { supported: false } },
|
|
19399
|
-
{ modelId: "composer-2.5", name: "Composer 2.5", effort: { supported: false } },
|
|
19400
|
-
{ modelId: "composer-2.5-fast", name: "Composer 2.5 Fast", effort: { supported: false } },
|
|
19401
|
-
{ 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" } },
|
|
19402
|
-
{ 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" } },
|
|
19403
|
-
{ modelId: "gpt-5.6-sol-none", name: "GPT-5.6 Sol None", effort: { supported: false } },
|
|
19404
|
-
{ modelId: "gpt-5.6-sol-none-fast", name: "GPT-5.6 Sol None Fast", effort: { supported: false } },
|
|
19405
|
-
{ 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" } },
|
|
19406
|
-
{ 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" } },
|
|
19407
|
-
{ modelId: "gpt-5.6-luna-none", name: "GPT-5.6 Luna None", effort: { supported: false } },
|
|
19408
|
-
{ modelId: "gpt-5.6-luna-none-fast", name: "GPT-5.6 Luna None Fast", effort: { supported: false } },
|
|
19409
|
-
{ 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" } },
|
|
19410
|
-
{ 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" } },
|
|
19411
|
-
{ modelId: "gpt-5.6-terra-none", name: "GPT-5.6 Terra None", effort: { supported: false } },
|
|
19412
|
-
{ modelId: "gpt-5.6-terra-none-fast", name: "GPT-5.6 Terra None Fast", effort: { supported: false } },
|
|
19413
|
-
{ 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" } },
|
|
19414
|
-
{ 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" } },
|
|
19415
|
-
{ 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" } },
|
|
19416
|
-
{ 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" } },
|
|
19417
|
-
{ 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" } },
|
|
19418
|
-
{ 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" } },
|
|
19419
|
-
{ modelId: "claude-sonnet-5", name: "Claude Sonnet 5", spawnModelTemplate: "claude-sonnet-5-{effort}", effort: { supported: true, levels: ["low", "medium", "high", "xhigh", "max"], default: "high" } },
|
|
19420
|
-
{ 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" } },
|
|
19421
|
-
{ 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" } },
|
|
19422
|
-
{ 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" } },
|
|
19423
|
-
{ modelId: "gemini-3.1-pro", name: "Gemini 3.1 Pro", effort: { supported: false } },
|
|
19424
|
-
{ modelId: "gemini-3.5-flash", name: "Gemini 3.5 Flash", effort: { supported: false } },
|
|
19425
|
-
{ modelId: "kimi-k2.7-code", name: "Kimi K2.7 Code", effort: { supported: false } },
|
|
19426
|
-
{ modelId: "glm-5.2", name: "GLM 5.2", spawnModelTemplate: "glm-5.2-{effort}", effort: { supported: true, levels: ["high", "max"], default: "max" } }
|
|
19427
|
-
]
|
|
19428
|
-
}
|
|
19429
|
-
}
|
|
19430
|
-
};
|
|
19431
|
-
|
|
19432
|
-
// ../../packages/core-unified-agent/src/models/registry.ts
|
|
19433
|
-
var EffortLevelSchema = external_exports.enum([
|
|
19434
|
-
"low",
|
|
19435
|
-
"medium",
|
|
19436
|
-
"high",
|
|
19437
|
-
"xhigh",
|
|
19438
|
-
"max",
|
|
19439
|
-
"ultra"
|
|
19440
|
-
]);
|
|
19441
|
-
var EffortSchema = external_exports.union([
|
|
19442
|
-
external_exports.object({
|
|
19443
|
-
supported: external_exports.literal(true),
|
|
19444
|
-
levels: external_exports.array(EffortLevelSchema).min(1),
|
|
19445
|
-
default: EffortLevelSchema
|
|
19446
|
-
}).strict(),
|
|
19447
|
-
external_exports.object({
|
|
19448
|
-
supported: external_exports.literal(false)
|
|
19449
|
-
}).strict()
|
|
19450
|
-
]);
|
|
19451
|
-
var ModelEntrySchema = external_exports.object({
|
|
19452
|
-
/** 모델 고유 식별자 (session/set_model에 전달되는 값) */
|
|
19453
|
-
modelId: external_exports.string(),
|
|
19454
|
-
/** 사람이 읽을 수 있는 모델 이름 */
|
|
19455
|
-
name: external_exports.string(),
|
|
19456
|
-
/** 모델 설명 (선택) */
|
|
19457
|
-
description: external_exports.string().optional(),
|
|
19458
|
-
/** spawn 시 실제 CLI 모델 ID를 조립해야 하는 경우의 템플릿 */
|
|
19459
|
-
spawnModelTemplate: external_exports.string().optional(),
|
|
19460
|
-
/** 카탈로그 ID와 실제 provider 모델 ID가 다른 경우의 원본 모델 ID */
|
|
19461
|
-
providerModelId: external_exports.string().optional(),
|
|
19462
|
-
/** provider가 모델과 별도로 받는 서비스 티어 */
|
|
19463
|
-
serviceTier: external_exports.string().optional(),
|
|
19464
|
-
/** 모델의 컨텍스트 윈도우 크기 (토큰) */
|
|
19465
|
-
contextWindow: external_exports.number().int().positive().optional(),
|
|
19466
|
-
/** 모델별 effort 설정 */
|
|
19467
|
-
effort: EffortSchema
|
|
19468
|
-
}).check((ctx) => {
|
|
19469
|
-
const effort = ctx.value.effort;
|
|
19470
|
-
if (effort.supported && !effort.levels.includes(effort.default)) {
|
|
19471
|
-
ctx.issues.push({
|
|
19472
|
-
code: "custom",
|
|
19473
|
-
input: effort.default,
|
|
19474
|
-
message: `effort.default "${effort.default}"\uC740(\uB294) levels \uBAA9\uB85D\uC5D0 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4`,
|
|
19475
|
-
path: ["effort", "default"]
|
|
19476
|
-
});
|
|
19477
|
-
}
|
|
19478
|
-
if (effort.supported && ctx.value.spawnModelTemplate && !ctx.value.spawnModelTemplate.includes("{effort}")) {
|
|
19479
|
-
ctx.issues.push({
|
|
19480
|
-
code: "custom",
|
|
19481
|
-
input: ctx.value.spawnModelTemplate,
|
|
19482
|
-
message: 'effort \uC9C0\uC6D0 \uBAA8\uB378\uC758 spawnModelTemplate\uC740 "{effort}" \uD50C\uB808\uC774\uC2A4\uD640\uB354\uB97C \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4',
|
|
19483
|
-
path: ["spawnModelTemplate"]
|
|
19484
|
-
});
|
|
19485
|
-
}
|
|
19486
|
-
if (ctx.value.serviceTier && !ctx.value.providerModelId) {
|
|
19487
|
-
ctx.issues.push({
|
|
19488
|
-
code: "custom",
|
|
19489
|
-
input: ctx.value.serviceTier,
|
|
19490
|
-
message: "serviceTier\uB97C \uC9C0\uC815\uD55C \uBAA8\uB378\uC740 providerModelId\uB3C4 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4",
|
|
19491
|
-
path: ["serviceTier"]
|
|
19492
|
-
});
|
|
19493
|
-
}
|
|
19494
|
-
});
|
|
19495
|
-
var ProviderSchema = external_exports.object({
|
|
19496
|
-
/** 프로바이더 표시 이름 */
|
|
19497
|
-
name: external_exports.string(),
|
|
19498
|
-
/** 기본 모델 ID */
|
|
19499
|
-
defaultModel: external_exports.string(),
|
|
19500
|
-
/** 사용 가능한 모델 목록 */
|
|
19501
|
-
models: external_exports.array(ModelEntrySchema).min(1)
|
|
19502
|
-
}).check((ctx) => {
|
|
19503
|
-
const ids = new Set(ctx.value.models.map((m) => m.modelId));
|
|
19504
|
-
if (!ids.has(ctx.value.defaultModel)) {
|
|
19505
|
-
ctx.issues.push({
|
|
19506
|
-
code: "custom",
|
|
19507
|
-
input: ctx.value.defaultModel,
|
|
19508
|
-
message: `defaultModel "${ctx.value.defaultModel}"\uC740(\uB294) models \uBAA9\uB85D\uC5D0 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4`,
|
|
19509
|
-
path: ["defaultModel"]
|
|
19510
|
-
});
|
|
19511
|
-
}
|
|
19512
|
-
});
|
|
19513
|
-
var ModelMappingSchema = external_exports.record(external_exports.string(), external_exports.string());
|
|
19514
|
-
var ModelsMapperEntrySchema = external_exports.object({
|
|
19515
|
-
/** modelId와 연관된 매핑 모델 */
|
|
19516
|
-
modelMapping: ModelMappingSchema,
|
|
19517
|
-
/** 추가 환경변수 (선택) */
|
|
19518
|
-
env: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
19519
|
-
});
|
|
19520
|
-
external_exports.record(external_exports.string(), ModelsMapperEntrySchema);
|
|
19521
|
-
var ModelsRegistrySchema = external_exports.object({
|
|
19522
|
-
/** 스키마 버전 */
|
|
19523
|
-
version: external_exports.number().int().positive(),
|
|
19524
|
-
/** 최종 업데이트 시각 */
|
|
19525
|
-
updatedAt: external_exports.string(),
|
|
19526
|
-
/** 프로바이더별 모델 정보 */
|
|
19527
|
-
providers: external_exports.record(external_exports.string(), ProviderSchema)
|
|
19528
|
-
});
|
|
19529
|
-
var registry2 = Object.freeze(ModelsRegistrySchema.parse(models_default));
|
|
19530
|
-
function getProviderModels(cli) {
|
|
19531
|
-
const provider = registry2.providers[cli];
|
|
19532
|
-
if (!provider) {
|
|
19533
|
-
throw new Error(`\uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uBC14\uC774\uB354: "${cli}"`);
|
|
19534
|
-
}
|
|
19535
|
-
return structuredClone(provider);
|
|
19536
|
-
}
|
|
19537
|
-
function getCursorSpawnEffortInfo(modelId) {
|
|
19538
|
-
const model = findProviderModel("cursor", modelId);
|
|
19539
|
-
if (!model.spawnModelTemplate || !model.effort.supported) {
|
|
19540
|
-
return { supported: false, levels: [], default: null };
|
|
19541
|
-
}
|
|
19542
|
-
return {
|
|
19543
|
-
supported: true,
|
|
19544
|
-
levels: [...model.effort.levels],
|
|
19545
|
-
default: model.effort.default
|
|
19546
|
-
};
|
|
19547
|
-
}
|
|
19548
|
-
function resolveCursorSpawnModel(modelId, effort) {
|
|
19549
|
-
const model = findProviderModel("cursor", modelId);
|
|
19550
|
-
if (!model.spawnModelTemplate) {
|
|
19551
|
-
return model.modelId;
|
|
19552
|
-
}
|
|
19553
|
-
if (!model.effort.supported) {
|
|
19554
|
-
return model.spawnModelTemplate;
|
|
19555
|
-
}
|
|
19556
|
-
const level = effort ?? model.effort.default;
|
|
19557
|
-
const resolvedLevel = model.effort.levels.includes(level) ? level : model.effort.default;
|
|
19558
|
-
if (!model.effort.levels.includes(resolvedLevel)) {
|
|
19559
|
-
throw new Error(
|
|
19560
|
-
`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(", ")}`
|
|
19561
|
-
);
|
|
19562
|
-
}
|
|
19563
|
-
return model.spawnModelTemplate.replace("{effort}", resolvedLevel);
|
|
19564
|
-
}
|
|
19565
|
-
function findProviderModel(cli, modelId) {
|
|
19566
|
-
const provider = registry2.providers[cli];
|
|
19567
|
-
if (!provider) {
|
|
19568
|
-
throw new Error(`\uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uBC14\uC774\uB354: "${cli}"`);
|
|
19569
|
-
}
|
|
19570
|
-
const model = provider.models.find((m) => m.modelId === modelId);
|
|
19571
|
-
if (!model) {
|
|
19572
|
-
throw new Error(`\uC54C \uC218 \uC5C6\uB294 \uBAA8\uB378: "${cli}/${modelId}"`);
|
|
19573
|
-
}
|
|
19574
|
-
return model;
|
|
19575
|
-
}
|
|
19576
|
-
|
|
19577
19362
|
// ../../packages/core-unified-agent/src/config/CliConfigs.ts
|
|
19578
19363
|
var CLI_BACKENDS = {
|
|
19579
19364
|
claude: {
|
|
@@ -19609,21 +19394,6 @@ var CLI_BACKENDS = {
|
|
|
19609
19394
|
requiresModelAtSpawn: false,
|
|
19610
19395
|
usesNpxBridge: false,
|
|
19611
19396
|
defaultMaxTokens: 1e5
|
|
19612
|
-
},
|
|
19613
|
-
cursor: {
|
|
19614
|
-
id: "cursor",
|
|
19615
|
-
cliCommand: "cursor-agent",
|
|
19616
|
-
protocol: "acp",
|
|
19617
|
-
authRequired: true,
|
|
19618
|
-
acpArgs: ["acp"],
|
|
19619
|
-
modes: [
|
|
19620
|
-
{ id: "agent", label: "Agent" }
|
|
19621
|
-
],
|
|
19622
|
-
supportsSessionClose: false,
|
|
19623
|
-
supportsSessionLoad: true,
|
|
19624
|
-
requiresModelAtSpawn: true,
|
|
19625
|
-
usesNpxBridge: false,
|
|
19626
|
-
defaultMaxTokens: 2e5
|
|
19627
19397
|
}
|
|
19628
19398
|
};
|
|
19629
19399
|
function createSpawnConfig(cli, options) {
|
|
@@ -19654,9 +19424,6 @@ function createSpawnConfig(cli, options) {
|
|
|
19654
19424
|
}
|
|
19655
19425
|
const command = options.cliPath ?? backend.cliCommand;
|
|
19656
19426
|
const args = backend.acpArgs ? [...backend.acpArgs] : [];
|
|
19657
|
-
if (cli === "cursor" && options.model) {
|
|
19658
|
-
args.unshift("--model", resolveCursorSpawnModel(options.model, options.effort));
|
|
19659
|
-
}
|
|
19660
19427
|
return {
|
|
19661
19428
|
command,
|
|
19662
19429
|
args,
|
|
@@ -19670,8 +19437,6 @@ function getYoloModeId(cli) {
|
|
|
19670
19437
|
switch (cli) {
|
|
19671
19438
|
case "claude":
|
|
19672
19439
|
return "bypassPermissions";
|
|
19673
|
-
case "cursor":
|
|
19674
|
-
return "agent";
|
|
19675
19440
|
case "codex":
|
|
19676
19441
|
return "yolo";
|
|
19677
19442
|
}
|
|
@@ -19870,25 +19635,156 @@ var CliDetector = class {
|
|
|
19870
19635
|
}
|
|
19871
19636
|
};
|
|
19872
19637
|
|
|
19873
|
-
// ../../packages/core-unified-agent/
|
|
19874
|
-
var
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
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
|
+
}
|
|
19889
19670
|
}
|
|
19890
|
-
|
|
19891
|
-
|
|
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);
|
|
19892
19788
|
}
|
|
19893
19789
|
emitTyped(event, ...args) {
|
|
19894
19790
|
return super.emit(event, ...args);
|
|
@@ -21601,453 +21497,6 @@ var UnifiedCodexAgentClient = class extends EventEmitter {
|
|
|
21601
21497
|
};
|
|
21602
21498
|
}
|
|
21603
21499
|
};
|
|
21604
|
-
var UnifiedCursorAgentClient = class extends EventEmitter {
|
|
21605
|
-
connection = null;
|
|
21606
|
-
sessionId = null;
|
|
21607
|
-
sessionCwd = null;
|
|
21608
|
-
currentSystemPrompt = null;
|
|
21609
|
-
firstPromptPending = null;
|
|
21610
|
-
currentConnectOptions = null;
|
|
21611
|
-
detector = new CliDetector();
|
|
21612
|
-
on(event, listener) {
|
|
21613
|
-
return super.on(event, listener);
|
|
21614
|
-
}
|
|
21615
|
-
once(event, listener) {
|
|
21616
|
-
return super.once(event, listener);
|
|
21617
|
-
}
|
|
21618
|
-
off(event, listener) {
|
|
21619
|
-
return super.off(event, listener);
|
|
21620
|
-
}
|
|
21621
|
-
emitTyped(event, ...args) {
|
|
21622
|
-
return super.emit(event, ...args);
|
|
21623
|
-
}
|
|
21624
|
-
async connect(options) {
|
|
21625
|
-
await this.disconnect();
|
|
21626
|
-
if (options.cli && options.cli !== "cursor") {
|
|
21627
|
-
throw new Error("UnifiedCursorAgentClient\uB294 cursor CLI\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4.");
|
|
21628
|
-
}
|
|
21629
|
-
const acpMcpServers = this.resolveMcpServers(options.mcpServers);
|
|
21630
|
-
const spawnConfig = createSpawnConfig("cursor", options);
|
|
21631
|
-
const cleanEnv = cleanEnvironment(process.env, options.env);
|
|
21632
|
-
const env = { ...cleanEnv };
|
|
21633
|
-
const connection = new AcpConnection({
|
|
21634
|
-
command: spawnConfig.command,
|
|
21635
|
-
args: spawnConfig.args,
|
|
21636
|
-
cliType: "cursor",
|
|
21637
|
-
cwd: options.cwd,
|
|
21638
|
-
env,
|
|
21639
|
-
requestTimeout: options.timeout,
|
|
21640
|
-
initTimeout: options.timeout,
|
|
21641
|
-
promptIdleTimeout: options.promptIdleTimeout,
|
|
21642
|
-
clientInfo: options.clientInfo,
|
|
21643
|
-
autoApprove: options.autoApprove,
|
|
21644
|
-
fsAccess: options.fsAccess
|
|
21645
|
-
});
|
|
21646
|
-
this.connection = connection;
|
|
21647
|
-
this.setupEventForwarding();
|
|
21648
|
-
const recentLogs = [];
|
|
21649
|
-
const collectLog = (message) => {
|
|
21650
|
-
recentLogs.push(message);
|
|
21651
|
-
if (recentLogs.length > 30) {
|
|
21652
|
-
recentLogs.shift();
|
|
21653
|
-
}
|
|
21654
|
-
};
|
|
21655
|
-
connection.on("log", collectLog);
|
|
21656
|
-
let session;
|
|
21657
|
-
try {
|
|
21658
|
-
session = await connection.connect(
|
|
21659
|
-
options.cwd,
|
|
21660
|
-
options.sessionId,
|
|
21661
|
-
acpMcpServers,
|
|
21662
|
-
options.systemPrompt
|
|
21663
|
-
);
|
|
21664
|
-
} catch (error51) {
|
|
21665
|
-
const connectionError = this.buildConnectionError(error51, recentLogs);
|
|
21666
|
-
await this.cleanupFailedConnection();
|
|
21667
|
-
throw connectionError;
|
|
21668
|
-
} finally {
|
|
21669
|
-
connection.off("log", collectLog);
|
|
21670
|
-
}
|
|
21671
|
-
return this.finalizeConnect(options, session);
|
|
21672
|
-
}
|
|
21673
|
-
async disconnect() {
|
|
21674
|
-
if (!this.connection) {
|
|
21675
|
-
this.clearSessionState();
|
|
21676
|
-
return;
|
|
21677
|
-
}
|
|
21678
|
-
const conn = this.connection;
|
|
21679
|
-
if (this.sessionId && conn.canResetSession) {
|
|
21680
|
-
try {
|
|
21681
|
-
await conn.endSession(this.sessionId);
|
|
21682
|
-
} catch {
|
|
21683
|
-
}
|
|
21684
|
-
}
|
|
21685
|
-
await conn.disconnect();
|
|
21686
|
-
conn.removeAllListeners();
|
|
21687
|
-
this.connection = null;
|
|
21688
|
-
this.clearSessionState();
|
|
21689
|
-
}
|
|
21690
|
-
async endSession() {
|
|
21691
|
-
if (!this.connection || !this.sessionId) {
|
|
21692
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21693
|
-
}
|
|
21694
|
-
await this.connection.endSession(this.sessionId);
|
|
21695
|
-
this.sessionId = null;
|
|
21696
|
-
}
|
|
21697
|
-
getConnectionInfo() {
|
|
21698
|
-
return {
|
|
21699
|
-
cli: this.connection ? "cursor" : null,
|
|
21700
|
-
protocol: this.connection ? "acp" : null,
|
|
21701
|
-
sessionId: this.sessionId,
|
|
21702
|
-
state: this.connection ? this.connection.connectionState : "disconnected"
|
|
21703
|
-
};
|
|
21704
|
-
}
|
|
21705
|
-
async detectClis() {
|
|
21706
|
-
return this.detector.detectAll(true);
|
|
21707
|
-
}
|
|
21708
|
-
async sendMessage(content) {
|
|
21709
|
-
if (!this.connection || !this.sessionId) {
|
|
21710
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21711
|
-
}
|
|
21712
|
-
const systemPrompt = this.firstPromptPending;
|
|
21713
|
-
if (!systemPrompt) {
|
|
21714
|
-
return this.connection.sendPrompt(this.sessionId, content);
|
|
21715
|
-
}
|
|
21716
|
-
const userBlocks = typeof content === "string" ? [{ type: "text", text: content }] : content;
|
|
21717
|
-
const response = await this.connection.sendPrompt(this.sessionId, [
|
|
21718
|
-
{ type: "text", text: systemPrompt },
|
|
21719
|
-
...userBlocks
|
|
21720
|
-
]);
|
|
21721
|
-
this.firstPromptPending = null;
|
|
21722
|
-
return response;
|
|
21723
|
-
}
|
|
21724
|
-
async cancelPrompt() {
|
|
21725
|
-
if (!this.connection || !this.sessionId) {
|
|
21726
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21727
|
-
}
|
|
21728
|
-
await this.connection.cancelSession(this.sessionId);
|
|
21729
|
-
}
|
|
21730
|
-
async setModel(model) {
|
|
21731
|
-
if (!this.connection || !this.sessionId) {
|
|
21732
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21733
|
-
}
|
|
21734
|
-
const reconnectOptions = this.buildReconnectOptions(model);
|
|
21735
|
-
await this.reconnectWithRestore(reconnectOptions, "\uBAA8\uB378 \uBCC0\uACBD");
|
|
21736
|
-
}
|
|
21737
|
-
async setConfigOption(configId, value) {
|
|
21738
|
-
if (!this.connection || !this.sessionId) {
|
|
21739
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21740
|
-
}
|
|
21741
|
-
if (configId === "effort" || configId === "reasoning_effort") {
|
|
21742
|
-
const reconnectOptions = this.buildEffortReconnectOptions(value);
|
|
21743
|
-
if (!reconnectOptions) {
|
|
21744
|
-
return;
|
|
21745
|
-
}
|
|
21746
|
-
await this.reconnectWithRestore(reconnectOptions, "effort \uBCC0\uACBD");
|
|
21747
|
-
return;
|
|
21748
|
-
}
|
|
21749
|
-
if (configId === "model") {
|
|
21750
|
-
return this.setModel(value);
|
|
21751
|
-
}
|
|
21752
|
-
await this.connection.setConfigOption(this.sessionId, configId, value);
|
|
21753
|
-
}
|
|
21754
|
-
async setMode(mode) {
|
|
21755
|
-
if (!this.connection || !this.sessionId) {
|
|
21756
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21757
|
-
}
|
|
21758
|
-
await this.connection.setMode(this.sessionId, mode);
|
|
21759
|
-
}
|
|
21760
|
-
async setYoloMode(enabled) {
|
|
21761
|
-
return this.setMode(enabled ? getYoloModeId("cursor") : "default");
|
|
21762
|
-
}
|
|
21763
|
-
getAvailableModes() {
|
|
21764
|
-
return getBackendConfig("cursor").modes ?? [];
|
|
21765
|
-
}
|
|
21766
|
-
getAvailableModels() {
|
|
21767
|
-
return getProviderModels("cursor");
|
|
21768
|
-
}
|
|
21769
|
-
getCurrentSystemPrompt() {
|
|
21770
|
-
return this.currentSystemPrompt;
|
|
21771
|
-
}
|
|
21772
|
-
async loadSession(sessionId, mcpServers) {
|
|
21773
|
-
if (!this.connection) {
|
|
21774
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21775
|
-
}
|
|
21776
|
-
await this.connection.loadSession({
|
|
21777
|
-
sessionId,
|
|
21778
|
-
cwd: this.sessionCwd ?? process.cwd(),
|
|
21779
|
-
mcpServers: this.resolveMcpServers(mcpServers)
|
|
21780
|
-
});
|
|
21781
|
-
this.sessionId = sessionId;
|
|
21782
|
-
this.currentSystemPrompt = null;
|
|
21783
|
-
this.firstPromptPending = null;
|
|
21784
|
-
}
|
|
21785
|
-
async resetSession(cwd) {
|
|
21786
|
-
if (!this.connection || !this.sessionId) {
|
|
21787
|
-
throw new Error("\uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
21788
|
-
}
|
|
21789
|
-
const targetCwd = cwd ?? this.sessionCwd ?? process.cwd();
|
|
21790
|
-
if (!this.connection.canResetSession) {
|
|
21791
|
-
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.");
|
|
21792
|
-
}
|
|
21793
|
-
await this.connection.endSession(this.sessionId);
|
|
21794
|
-
this.sessionId = null;
|
|
21795
|
-
const session = this.currentSystemPrompt ? await this.connection.reconnectSession(
|
|
21796
|
-
targetCwd,
|
|
21797
|
-
void 0,
|
|
21798
|
-
void 0,
|
|
21799
|
-
this.currentSystemPrompt
|
|
21800
|
-
) : await this.connection.reconnectSession(targetCwd);
|
|
21801
|
-
this.sessionId = session.sessionId;
|
|
21802
|
-
this.sessionCwd = targetCwd;
|
|
21803
|
-
this.firstPromptPending = this.currentSystemPrompt;
|
|
21804
|
-
return {
|
|
21805
|
-
cli: "cursor",
|
|
21806
|
-
protocol: "acp",
|
|
21807
|
-
session
|
|
21808
|
-
};
|
|
21809
|
-
}
|
|
21810
|
-
resolveMcpServers(servers) {
|
|
21811
|
-
return servers?.length ? mcpServerConfigsToAcp(servers) : [];
|
|
21812
|
-
}
|
|
21813
|
-
async finalizeConnect(options, session) {
|
|
21814
|
-
if (options.yoloMode && session.sessionId) {
|
|
21815
|
-
try {
|
|
21816
|
-
await this.connection.setMode(session.sessionId, getYoloModeId("cursor"));
|
|
21817
|
-
} catch {
|
|
21818
|
-
}
|
|
21819
|
-
}
|
|
21820
|
-
this.sessionId = session.sessionId;
|
|
21821
|
-
this.sessionCwd = options.cwd;
|
|
21822
|
-
this.currentSystemPrompt = options.systemPrompt ?? null;
|
|
21823
|
-
this.firstPromptPending = options.sessionId ? null : this.currentSystemPrompt;
|
|
21824
|
-
this.currentConnectOptions = this.cloneConnectOptions(options);
|
|
21825
|
-
return {
|
|
21826
|
-
cli: "cursor",
|
|
21827
|
-
protocol: "acp",
|
|
21828
|
-
session
|
|
21829
|
-
};
|
|
21830
|
-
}
|
|
21831
|
-
clearSessionState() {
|
|
21832
|
-
this.sessionId = null;
|
|
21833
|
-
this.sessionCwd = null;
|
|
21834
|
-
this.currentSystemPrompt = null;
|
|
21835
|
-
this.firstPromptPending = null;
|
|
21836
|
-
this.currentConnectOptions = null;
|
|
21837
|
-
}
|
|
21838
|
-
buildReconnectOptions(model) {
|
|
21839
|
-
if (!this.currentConnectOptions) {
|
|
21840
|
-
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.");
|
|
21841
|
-
}
|
|
21842
|
-
const options = this.cloneConnectOptions(this.currentConnectOptions);
|
|
21843
|
-
const effort = this.resolveEffortForModel(model, options.effort);
|
|
21844
|
-
delete options.sessionId;
|
|
21845
|
-
if (effort) {
|
|
21846
|
-
options.effort = effort;
|
|
21847
|
-
} else {
|
|
21848
|
-
delete options.effort;
|
|
21849
|
-
}
|
|
21850
|
-
return {
|
|
21851
|
-
...options,
|
|
21852
|
-
cli: "cursor",
|
|
21853
|
-
model
|
|
21854
|
-
};
|
|
21855
|
-
}
|
|
21856
|
-
buildEffortReconnectOptions(effort) {
|
|
21857
|
-
if (!this.currentConnectOptions) {
|
|
21858
|
-
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.");
|
|
21859
|
-
}
|
|
21860
|
-
if (!this.currentConnectOptions.model) {
|
|
21861
|
-
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.");
|
|
21862
|
-
}
|
|
21863
|
-
if (this.currentConnectOptions.effort === effort) {
|
|
21864
|
-
return null;
|
|
21865
|
-
}
|
|
21866
|
-
const effortInfo = getCursorSpawnEffortInfo(this.currentConnectOptions.model);
|
|
21867
|
-
if (!effortInfo.supported) {
|
|
21868
|
-
return null;
|
|
21869
|
-
}
|
|
21870
|
-
if (!effortInfo.levels.includes(effort)) {
|
|
21871
|
-
throw new Error(
|
|
21872
|
-
`[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(", ")}`
|
|
21873
|
-
);
|
|
21874
|
-
}
|
|
21875
|
-
const options = this.cloneConnectOptions(this.currentConnectOptions);
|
|
21876
|
-
delete options.sessionId;
|
|
21877
|
-
return {
|
|
21878
|
-
...options,
|
|
21879
|
-
cli: "cursor",
|
|
21880
|
-
effort
|
|
21881
|
-
};
|
|
21882
|
-
}
|
|
21883
|
-
resolveEffortForModel(model, effort) {
|
|
21884
|
-
const effortInfo = getCursorSpawnEffortInfo(model);
|
|
21885
|
-
if (!effortInfo.supported) {
|
|
21886
|
-
return void 0;
|
|
21887
|
-
}
|
|
21888
|
-
if (effort && effortInfo.levels.includes(effort)) {
|
|
21889
|
-
return effort;
|
|
21890
|
-
}
|
|
21891
|
-
return effortInfo.default ?? void 0;
|
|
21892
|
-
}
|
|
21893
|
-
async reconnectWithRestore(nextOptions, label) {
|
|
21894
|
-
if (!this.currentConnectOptions) {
|
|
21895
|
-
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.`);
|
|
21896
|
-
}
|
|
21897
|
-
const previousOptions = this.cloneConnectOptions(this.currentConnectOptions);
|
|
21898
|
-
try {
|
|
21899
|
-
await this.connect(nextOptions);
|
|
21900
|
-
} catch (error51) {
|
|
21901
|
-
try {
|
|
21902
|
-
await this.connect(previousOptions);
|
|
21903
|
-
} catch (restoreError) {
|
|
21904
|
-
throw new Error(
|
|
21905
|
-
`[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)}`
|
|
21906
|
-
);
|
|
21907
|
-
}
|
|
21908
|
-
throw new Error(
|
|
21909
|
-
`[cursor] ${label} \uC2E4\uD328\uB85C \uC774\uC804 \uC5F0\uACB0\uC744 \uBCF5\uAD6C\uD588\uC2B5\uB2C8\uB2E4. ${label} \uC624\uB958: ${this.formatErrorMessage(error51)}`
|
|
21910
|
-
);
|
|
21911
|
-
}
|
|
21912
|
-
}
|
|
21913
|
-
formatErrorMessage(error51) {
|
|
21914
|
-
if (error51 instanceof Error) {
|
|
21915
|
-
return error51.message;
|
|
21916
|
-
}
|
|
21917
|
-
return String(error51);
|
|
21918
|
-
}
|
|
21919
|
-
cloneConnectOptions(options) {
|
|
21920
|
-
return {
|
|
21921
|
-
...options,
|
|
21922
|
-
cli: "cursor",
|
|
21923
|
-
env: options.env ? { ...options.env } : void 0,
|
|
21924
|
-
clientInfo: options.clientInfo ? { ...options.clientInfo } : void 0,
|
|
21925
|
-
mcpServers: options.mcpServers?.map((server) => ({
|
|
21926
|
-
...server,
|
|
21927
|
-
headers: server.headers?.map((header) => ({ ...header }))
|
|
21928
|
-
}))
|
|
21929
|
-
};
|
|
21930
|
-
}
|
|
21931
|
-
setupEventForwarding() {
|
|
21932
|
-
if (!this.connection) return;
|
|
21933
|
-
this.connection.on("stateChange", (state) => {
|
|
21934
|
-
this.emitTyped("stateChange", state);
|
|
21935
|
-
});
|
|
21936
|
-
this.connection.on("userMessageChunk", (text, sessionId) => {
|
|
21937
|
-
this.emitTyped("userMessageChunk", text, sessionId);
|
|
21938
|
-
});
|
|
21939
|
-
this.connection.on("messageChunk", (text, sessionId) => {
|
|
21940
|
-
this.emitTyped("messageChunk", text, sessionId);
|
|
21941
|
-
});
|
|
21942
|
-
this.connection.on("thoughtChunk", (text, sessionId) => {
|
|
21943
|
-
this.emitTyped("thoughtChunk", text, sessionId);
|
|
21944
|
-
});
|
|
21945
|
-
this.connection.on("toolCall", (title, status, sessionId, data) => {
|
|
21946
|
-
this.emitTyped("toolCall", title, status, sessionId, data);
|
|
21947
|
-
});
|
|
21948
|
-
this.connection.on("toolCallUpdate", (title, status, sessionId, data) => {
|
|
21949
|
-
this.emitTyped("toolCallUpdate", title, status, sessionId, data);
|
|
21950
|
-
});
|
|
21951
|
-
this.connection.on("plan", (plan, sessionId) => {
|
|
21952
|
-
this.emitTyped("plan", plan, sessionId);
|
|
21953
|
-
});
|
|
21954
|
-
this.connection.on("availableCommandsUpdate", (commands, sessionId) => {
|
|
21955
|
-
this.emitTyped("availableCommandsUpdate", commands, sessionId);
|
|
21956
|
-
});
|
|
21957
|
-
this.connection.on("sessionUpdate", (update) => {
|
|
21958
|
-
this.emitTyped("sessionUpdate", update);
|
|
21959
|
-
});
|
|
21960
|
-
this.connection.on("permissionRequest", (params, resolve) => {
|
|
21961
|
-
this.emitTyped("permissionRequest", params, resolve);
|
|
21962
|
-
});
|
|
21963
|
-
this.connection.on("fileRead", (params, resolve) => {
|
|
21964
|
-
this.emitTyped("fileRead", params, resolve);
|
|
21965
|
-
});
|
|
21966
|
-
this.connection.on("fileWrite", (params, resolve) => {
|
|
21967
|
-
this.emitTyped("fileWrite", params, resolve);
|
|
21968
|
-
});
|
|
21969
|
-
this.connection.on("promptComplete", (sessionId) => {
|
|
21970
|
-
this.emitTyped("promptComplete", sessionId);
|
|
21971
|
-
});
|
|
21972
|
-
this.connection.on("error", (err) => {
|
|
21973
|
-
this.emitTyped("error", err);
|
|
21974
|
-
});
|
|
21975
|
-
this.connection.on("exit", (code, signal) => {
|
|
21976
|
-
this.emitTyped("exit", code, signal);
|
|
21977
|
-
});
|
|
21978
|
-
this.connection.on("log", (msg) => {
|
|
21979
|
-
this.emitTyped("log", msg);
|
|
21980
|
-
});
|
|
21981
|
-
this.connection.on("logEntry", (entry) => {
|
|
21982
|
-
this.emitTyped("logEntry", entry);
|
|
21983
|
-
});
|
|
21984
|
-
}
|
|
21985
|
-
async cleanupFailedConnection() {
|
|
21986
|
-
if (!this.connection) {
|
|
21987
|
-
return;
|
|
21988
|
-
}
|
|
21989
|
-
try {
|
|
21990
|
-
await this.connection.disconnect();
|
|
21991
|
-
} catch {
|
|
21992
|
-
}
|
|
21993
|
-
this.connection.removeAllListeners();
|
|
21994
|
-
this.connection = null;
|
|
21995
|
-
this.clearSessionState();
|
|
21996
|
-
}
|
|
21997
|
-
buildConnectionError(error51, recentLogs) {
|
|
21998
|
-
if (getBackendConfig("cursor").authRequired && this.isAuthenticationError(error51, recentLogs)) {
|
|
21999
|
-
return new Error(
|
|
22000
|
-
"[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."
|
|
22001
|
-
);
|
|
22002
|
-
}
|
|
22003
|
-
if (error51 instanceof Error) {
|
|
22004
|
-
return error51;
|
|
22005
|
-
}
|
|
22006
|
-
if (typeof error51 === "object" && error51 !== null) {
|
|
22007
|
-
const obj = error51;
|
|
22008
|
-
if (typeof obj.message === "string") {
|
|
22009
|
-
const code = typeof obj.code === "number" ? ` (code: ${obj.code})` : "";
|
|
22010
|
-
const data = obj.data ? ` \u2014 ${JSON.stringify(obj.data)}` : "";
|
|
22011
|
-
return new Error(`${obj.message}${code}${data}`);
|
|
22012
|
-
}
|
|
22013
|
-
return new Error(JSON.stringify(error51));
|
|
22014
|
-
}
|
|
22015
|
-
return new Error(String(error51));
|
|
22016
|
-
}
|
|
22017
|
-
isAuthenticationError(error51, recentLogs) {
|
|
22018
|
-
const authPatterns = [
|
|
22019
|
-
/auth_required/i,
|
|
22020
|
-
/authentication required/i,
|
|
22021
|
-
/not authenticated/i,
|
|
22022
|
-
/please login/i,
|
|
22023
|
-
/please log in/i,
|
|
22024
|
-
/sign in/i,
|
|
22025
|
-
/reauth/i,
|
|
22026
|
-
/unauthorized/i,
|
|
22027
|
-
/invalid api key/i
|
|
22028
|
-
];
|
|
22029
|
-
if (this.matchAnyPattern(this.extractErrorText(error51), authPatterns)) {
|
|
22030
|
-
return true;
|
|
22031
|
-
}
|
|
22032
|
-
return recentLogs.some((log) => this.matchAnyPattern(log, authPatterns));
|
|
22033
|
-
}
|
|
22034
|
-
extractErrorText(error51) {
|
|
22035
|
-
if (error51 instanceof Error) {
|
|
22036
|
-
const code = error51.code;
|
|
22037
|
-
if (code === -32e3) {
|
|
22038
|
-
return `auth_required ${error51.message}`;
|
|
22039
|
-
}
|
|
22040
|
-
return error51.message;
|
|
22041
|
-
}
|
|
22042
|
-
if (typeof error51 === "string") {
|
|
22043
|
-
return error51;
|
|
22044
|
-
}
|
|
22045
|
-
return String(error51);
|
|
22046
|
-
}
|
|
22047
|
-
matchAnyPattern(text, patterns) {
|
|
22048
|
-
return patterns.some((pattern) => pattern.test(text));
|
|
22049
|
-
}
|
|
22050
|
-
};
|
|
22051
21500
|
|
|
22052
21501
|
// ../../packages/core-unified-agent/src/client/UnifiedAgent.ts
|
|
22053
21502
|
var UnifiedAgent = {
|
|
@@ -22057,8 +21506,6 @@ var UnifiedAgent = {
|
|
|
22057
21506
|
return new UnifiedClaudeAgentClient();
|
|
22058
21507
|
case "codex":
|
|
22059
21508
|
return new UnifiedCodexAgentClient();
|
|
22060
|
-
case "cursor":
|
|
22061
|
-
return new UnifiedCursorAgentClient();
|
|
22062
21509
|
}
|
|
22063
21510
|
},
|
|
22064
21511
|
async build(options = {}) {
|
|
@@ -22071,7 +21518,7 @@ var UnifiedAgent = {
|
|
|
22071
21518
|
const preferred = await new CliDetector().getPreferred();
|
|
22072
21519
|
if (!preferred) {
|
|
22073
21520
|
throw new Error(
|
|
22074
|
-
"\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."
|
|
22075
21522
|
);
|
|
22076
21523
|
}
|
|
22077
21524
|
return this.createClient(preferred.cli);
|