ryco-cli 0.1.5 → 0.1.7
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/README.md +50 -2
- package/dist/{AzureDevOpsSourceControlProvider-CdgNqZ5j.cjs → AzureDevOpsSourceControlProvider-5exivY-1.cjs} +2 -2
- package/dist/{AzureDevOpsSourceControlProvider-OsyDSESj.mjs → AzureDevOpsSourceControlProvider-CF5LuCHp.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-DBTH98i4.cjs → BitbucketSourceControlProvider-1GWENqcl.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-SQ3gKdFs.mjs → BitbucketSourceControlProvider-CKH09tfT.mjs} +3 -3
- package/dist/{BunPTY-B_vjRZN4.mjs → BunPTY-BWhtEA50.mjs} +1 -1
- package/dist/{ClaudeDriver-D9yC2F0b.cjs → ClaudeDriver-BXLdjrht.cjs} +187 -8
- package/dist/{ClaudeDriver-2dTtrsFD.mjs → ClaudeDriver-WwWFTu61.mjs} +188 -9
- package/dist/{CodexDriver-CIDYevQX.mjs → CodexDriver-93-TmCrO.mjs} +16 -8
- package/dist/{CodexDriver-BC2B-qpT.cjs → CodexDriver-BboMT9uk.cjs} +15 -7
- package/dist/{CodexTextGeneration-DNeO-8GE.cjs → CodexTextGeneration-0pRbJji3.cjs} +3 -3
- package/dist/{CodexTextGeneration-CjknB1Xl.mjs → CodexTextGeneration-BU9Myn87.mjs} +4 -4
- package/dist/{CopilotDriver-NPhlLrk2.mjs → CopilotDriver-BASi8pJ0.mjs} +15 -8
- package/dist/{CopilotDriver-BGChrP5c.cjs → CopilotDriver-DCsv-17W.cjs} +14 -7
- package/dist/{CursorDriver-CYxn4_c1.cjs → CursorDriver-BTSiM3A8.cjs} +163 -16
- package/dist/{CursorDriver-BcAVbT8D.mjs → CursorDriver-D5LvIqUk.mjs} +164 -17
- package/dist/{ForgejoSourceControlProvider-D3wP2Cav.cjs → ForgejoSourceControlProvider-BTXRDCGB.cjs} +2 -2
- package/dist/{ForgejoSourceControlProvider-BjCE3730.mjs → ForgejoSourceControlProvider-e-4hvvZ_.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-DByZ_cnw.mjs → GitHubSourceControlProvider-26IofDAO.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-DU_7IvMa.cjs → GitHubSourceControlProvider-DWmwkA_y.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-BVJ5IqTS.cjs → GitLabSourceControlProvider-D-YHnxRe.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-BdMCIjXb.mjs → GitLabSourceControlProvider-DePct78W.mjs} +3 -3
- package/dist/{Metrics-BCOc3Ml2.mjs → Metrics-6Xj17Se3.mjs} +94 -2
- package/dist/{Metrics-DNOriWhP.cjs → Metrics-CIW1QH7M.cjs} +128 -0
- package/dist/{NodePTY-_u3kQLvd.mjs → NodePTY-C_cR3Ayy.mjs} +1 -1
- package/dist/{OpenCodeDriver-fwqXoVyH.mjs → OpenCodeDriver-BhvLOmvn.mjs} +336 -43
- package/dist/{OpenCodeDriver-DyR83FcY.cjs → OpenCodeDriver-CVeZ4n9-.cjs} +335 -42
- package/dist/{SourceControlProviderDiscoveryCatalog-DqQVhwYM.cjs → SourceControlProviderDiscoveryCatalog-DeFR5xH3.cjs} +98 -161
- package/dist/{SourceControlProviderDiscoveryCatalog-CQiMyDCC.mjs → SourceControlProviderDiscoveryCatalog-mJV_Xitr.mjs} +100 -145
- package/dist/bin.cjs +30639 -28744
- package/dist/bin.mjs +30602 -28709
- package/dist/client/assets/{AnimatedHeight-CYuVQOpY.js → AnimatedHeight-BSU0lzYs.js} +1 -1
- package/dist/client/assets/AppearanceSettings-D7q0ujGK.js +1 -0
- package/dist/client/assets/BranchToolbar.logic-CZIFSvhd.js +1 -0
- package/dist/client/assets/ChatRightPanel-CWHOIuiQ.js +188 -0
- package/dist/client/assets/ChatThreadRouteView-bA7xWXzc.js +1 -0
- package/dist/client/assets/CommandPaletteDialog-DNYaVOZO.js +1 -0
- package/dist/client/assets/CompositeRoot-B_KEfCUE.js +1 -0
- package/dist/client/assets/ConnectionsSettings-CLZPbx_K.js +1 -0
- package/dist/client/assets/DiagnosticsSettings-DtzPCb6N.js +1 -0
- package/dist/client/assets/DialogHandle-DuHnmWoE.js +1 -0
- package/dist/client/assets/{DialogRoot-DaMwpoP_.js → DialogRoot-BV25qAcA.js} +1 -1
- package/dist/client/assets/DialogTitle-DQsi-RTa.js +1 -0
- package/dist/client/assets/DialogTrigger-D0fA01C6.js +1 -0
- package/dist/client/assets/DialogViewport-CMV_BePU.js +1 -0
- package/dist/client/assets/DraftChatThreadRouteView-BoiKnrii.js +1 -0
- package/dist/client/assets/JetBrainsIcons-BcPxJlMf.js +1 -0
- package/dist/client/assets/KeybindingsSettings-LuI98pdF.js +7 -0
- package/dist/client/assets/McpServersSettings-BFMuWYVV.js +6 -0
- package/dist/client/assets/NoActiveThreadState-C2q_O1kP.js +1 -0
- package/dist/client/assets/OpinionatedPluginsSettings-Bqwct37O.js +1 -0
- package/dist/client/assets/ProjectFavicon-D2imiJ8M.js +1 -0
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-BFzNCo3I.js → ProviderUpdateLaunchNotification.logic-CJgA--nK.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-B97vbeu6.js +1 -0
- package/dist/client/assets/{RedactedSensitiveText-UnZZJnFF.js → RedactedSensitiveText-B2GFTyfq.js} +1 -1
- package/dist/client/assets/RootAppShell-C1xTR98P.js +12 -0
- package/dist/client/assets/SettingsDialog-Q0Q8O5oH.js +2 -0
- package/dist/client/assets/SourceControlSettings-KAvoPTNi.js +1 -0
- package/dist/client/assets/StatisticsPanel-BzsQ444K.js +64 -0
- package/dist/client/assets/ThreadStatusIndicators-Cw_jLVQf.js +1 -0
- package/dist/client/assets/{ThreadTerminalDrawer-BXoXAbsR.js → ThreadTerminalDrawer-D1WnSemH.js} +17 -17
- package/dist/client/assets/ThreadWorkspacePanel-L4qCPTOA.js +166 -0
- package/dist/client/assets/{alert-dialog-BJQbh5gX.js → alert-dialog-CNmKa0BK.js} +1 -1
- package/dist/client/assets/chart-column-BWSKYZ_a.js +1 -0
- package/dist/client/assets/{chatThreadActions--n7v5mnB.js → chatThreadActions-TtDsiwDC.js} +1 -1
- package/dist/client/assets/chevron-up-zopJ_99l.js +1 -0
- package/dist/client/assets/{clamp-NYtK3f5s.js → clamp-Ds6WJu8j.js} +1 -1
- package/dist/client/assets/clipboard-copy-BoJGpdmJ.js +1 -0
- package/dist/client/assets/clock-CzUHThzk.js +1 -0
- package/dist/client/assets/commandPaletteStore-KebG835b.js +1 -0
- package/dist/client/assets/composerDraftStore-DpPEQ6BN.js +21 -0
- package/dist/client/assets/desktopUpdateAtoms-BQ0GGEfM.js +2 -0
- package/dist/client/assets/{download-Bi4-cFbc.js → download-CUiRE0N9.js} +1 -1
- package/dist/client/assets/{draft-input-BGSRgOW7.js → draft-input-CwpGDtoT.js} +1 -1
- package/dist/client/assets/editorPreferences-jN7DKbyt.js +1 -0
- package/dist/client/assets/empty-CBuXePtg.js +1 -0
- package/dist/client/assets/{group-Dwm-OV-r.js → group-BpZvxjG5.js} +1 -1
- package/dist/client/assets/{index-BI5yFj9n.js → index-BKzXTNJ_.js} +2 -2
- package/dist/client/assets/{input-BfUa3JUD.js → input-CgDawd6k.js} +1 -1
- package/dist/client/assets/kbd-QYSL97CK.js +1 -0
- package/dist/client/assets/{keybindings--G1bkIjA.js → keybindings-CUTRYI_A.js} +1 -1
- package/dist/client/assets/{keyboard-B87VTfPa.js → keyboard-DFFiI7JY.js} +1 -1
- package/dist/client/assets/keyedQuery-DiOCbGH0.js +0 -0
- package/dist/client/assets/main-BgFGju3e.js +9 -0
- package/dist/client/assets/main-D0UFdwts.css +2 -0
- package/dist/client/assets/palette-BXCL909c.js +1 -0
- package/dist/client/assets/play-DI2LZohg.js +1 -0
- package/dist/client/assets/plus-DzgIfHUF.js +1 -0
- package/dist/client/assets/projectAtoms-DXXpuERK.js +1 -0
- package/dist/client/assets/providerDriverMeta-CRNNp0q3.js +1 -0
- package/dist/client/assets/providerIconUtils-D-DFhem2.js +47 -0
- package/dist/client/assets/radio-group-_PPYg3YY.js +1 -0
- package/dist/client/assets/{refresh-cw-CRxaXR0E.js → refresh-cw-BsQTNBXl.js} +1 -1
- package/dist/client/assets/{resolveAriaLabelledBy-D4fWpj84.js → resolveAriaLabelledBy-CRHo_s16.js} +1 -1
- package/dist/client/assets/rightPanelRouteSearch-CfmZ7osj.js +1 -0
- package/dist/client/assets/scale-DDEJ-tvn.js +1 -0
- package/dist/client/assets/scroll-area-HgsI-ErG.js +1 -0
- package/dist/client/assets/separator-ClnL4mUB.js +1 -0
- package/dist/client/assets/{server-tdx7WxLI.js → server-Bbs3L-6_.js} +1 -1
- package/dist/client/assets/session-logic-CKQkgIwo.js +4 -0
- package/dist/client/assets/settingsDialogStore-SG-W1q0A.js +1 -0
- package/dist/client/assets/settingsLayout-G5xVm-ZT.js +1 -0
- package/dist/client/assets/shallow-Dmd-gez1.js +1 -0
- package/dist/client/assets/sidebar-_u7SGgmC.js +1 -0
- package/dist/client/assets/sidebarStatusText-BTYnwflG.js +1 -0
- package/dist/client/assets/skeleton-CmUvhZGP.js +1 -0
- package/dist/client/assets/storeSelectors-DhJRpdiw.js +1 -0
- package/dist/client/assets/threadSelectionStore-ygmA4DNA.js +1 -0
- package/dist/client/assets/toast-DmA_ziPT.js +1 -0
- package/dist/client/assets/toggle-DGS7tKuj.js +1 -0
- package/dist/client/assets/{toggle-group-DdKXHoT3.js → toggle-group-Dtv1ZUFW.js} +1 -1
- package/dist/client/assets/tokenModePresentation-Dor1DnBx.js +1 -0
- package/dist/client/assets/{trash-2-CZQem-sz.js → trash-2-C2G3VGoV.js} +1 -1
- package/dist/client/assets/triangle-alert-Bpz3xGu5.js +1 -0
- package/dist/client/assets/undo-2-C3rtxuqZ.js +1 -0
- package/dist/client/assets/useHandleNewThread-ypSbzG0P.js +1 -0
- package/dist/client/assets/useLabelableId-Bc7KEnHU.js +1 -0
- package/dist/client/assets/useNavigate-_4hWGSey.js +1 -0
- package/dist/client/assets/useTheme-HcKmBfpF.js +1 -0
- package/dist/client/assets/{vscode-icons-E8NUFd62.js → vscode-icons-DdSTtxYd.js} +1 -1
- package/dist/client/assets/{wrench-DEteICtk.js → wrench-C4jdis40.js} +1 -1
- package/dist/client/assets/x-CG2WU63t.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/{collectUint8StreamText-DuFJyaQh.mjs → collectUint8StreamText-Lv4GGI79.mjs} +488 -16
- package/dist/{collectUint8StreamText-DbCOJom3.cjs → collectUint8StreamText-uNXVRHOf.cjs} +510 -14
- package/dist/{makeManagedServerProvider-C3cQUDkZ.cjs → makeManagedServerProvider-3SD-Q5xh.cjs} +1 -1
- package/dist/{makeManagedServerProvider-wFGZ2-vd.mjs → makeManagedServerProvider-CkPEptun.mjs} +2 -2
- package/package.json +1 -1
- package/dist/client/assets/AppearanceSettings-BBbC8CV5.js +0 -1
- package/dist/client/assets/BranchToolbar.logic-Di2EkKiO.js +0 -1
- package/dist/client/assets/ChatRightPanel-BJ_cVP66.js +0 -188
- package/dist/client/assets/ChatThreadRouteView-DmxD3m2U.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-CAzz6bsT.js +0 -1
- package/dist/client/assets/CompositeRoot-BvXCwn2c.js +0 -1
- package/dist/client/assets/ConnectionsSettings-Cmxm0y2u.js +0 -1
- package/dist/client/assets/DialogHandle-CXNAm3QY.js +0 -1
- package/dist/client/assets/DialogTitle-KXmfgzP3.js +0 -1
- package/dist/client/assets/DialogTrigger-NHyQnW3X.js +0 -1
- package/dist/client/assets/DialogViewport-CL0WR9a5.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-C_hqauF6.js +0 -1
- package/dist/client/assets/JetBrainsIcons-BcR8pCma.js +0 -1
- package/dist/client/assets/KeybindingsSettings-m2AteGOl.js +0 -7
- package/dist/client/assets/McpServersSettings-DndIDxgA.js +0 -6
- package/dist/client/assets/NoActiveThreadState-Bt-Wkv-C.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-oDtdE6qx.js +0 -1
- package/dist/client/assets/ProjectFavicon-j9IX_7-B.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-CvlIBNVJ.js +0 -1
- package/dist/client/assets/QueryClientProvider-BZxRKpeb.js +0 -1
- package/dist/client/assets/RootAppShell-CyHZ_F5P.js +0 -12
- package/dist/client/assets/SettingsDialog-BYJ8AhQp.js +0 -2
- package/dist/client/assets/SourceControlSettings-7xU6VH6N.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-M9FWDEex.js +0 -1
- package/dist/client/assets/ThreadWorkspacePanel-D1J63TVD.js +0 -166
- package/dist/client/assets/codexUsageLimits-BJQiZCqn.js +0 -1
- package/dist/client/assets/commandPaletteStore-oFMPKPmp.js +0 -1
- package/dist/client/assets/composerDraftStore-xu3n5gdX.js +0 -21
- package/dist/client/assets/desktopUpdateReactQuery-YSCkifKp.js +0 -2
- package/dist/client/assets/empty-BTxheW4B.js +0 -1
- package/dist/client/assets/environmentApi-BFHi_M02.js +0 -1
- package/dist/client/assets/folder-open-DJmHEPv9.js +0 -1
- package/dist/client/assets/kbd-Dd57M8OY.js +0 -1
- package/dist/client/assets/main-BQf5U-fz.js +0 -9
- package/dist/client/assets/main-DrwkwNo9.css +0 -2
- package/dist/client/assets/mutation-DJZgOJRu.js +0 -1
- package/dist/client/assets/plus-B10j9MbZ.js +0 -1
- package/dist/client/assets/providerDriverMeta-B6xuq7ij.js +0 -1
- package/dist/client/assets/providerIconUtils-Ch6hejVW.js +0 -47
- package/dist/client/assets/rightPanelRouteSearch-CTMFCS6R.js +0 -1
- package/dist/client/assets/scroll-area-BgFq7GRd.js +0 -1
- package/dist/client/assets/separator-CB3Ctlvi.js +0 -1
- package/dist/client/assets/session-logic-CaiGe4hy.js +0 -4
- package/dist/client/assets/settingsDialogStore-9vo22xKp.js +0 -1
- package/dist/client/assets/settingsLayout-B5o13iGO.js +0 -1
- package/dist/client/assets/sidebar-Bbdql7Af.js +0 -1
- package/dist/client/assets/skeleton-C8OZcsPq.js +0 -1
- package/dist/client/assets/storeSelectors-DBRyhCGm.js +0 -1
- package/dist/client/assets/threadRoutes-CfldSp4X.js +0 -1
- package/dist/client/assets/threadSelectionStore-BggKwzmQ.js +0 -1
- package/dist/client/assets/toast-DE-WwLMa.js +0 -1
- package/dist/client/assets/toggle-BFMa0a0Y.js +0 -1
- package/dist/client/assets/useHandleNewThread-DOPZAFqE.js +0 -1
- package/dist/client/assets/useLabelableId-BzWaBebJ.js +0 -1
- package/dist/client/assets/useNavigate-B1qgM5mt.js +0 -1
- package/dist/client/assets/useTheme-C7Ji7x06.js +0 -1
- package/dist/client/assets/x-b9324xm-.js +0 -1
- package/dist/{NodeSqliteClient-BXy61fAd.mjs → NodeSqliteClient-A1TEgwj_.mjs} +1 -1
- package/dist/{NodeSqliteClient-homCO8-6.cjs → NodeSqliteClient-B5aDHbNc.cjs} +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const require_chunk = require("./chunk-jM1PLTSZ.cjs");
|
|
4
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
5
|
-
const require_Metrics = require("./Metrics-
|
|
4
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-uNXVRHOf.cjs");
|
|
5
|
+
const require_Metrics = require("./Metrics-CIW1QH7M.cjs");
|
|
6
6
|
const require_bin = require("./bin.cjs");
|
|
7
|
-
const require_makeManagedServerProvider = require("./makeManagedServerProvider-
|
|
7
|
+
const require_makeManagedServerProvider = require("./makeManagedServerProvider-3SD-Q5xh.cjs");
|
|
8
8
|
const require_ProviderDriver = require("./ProviderDriver--rNeAi3B.cjs");
|
|
9
9
|
let effect_Effect = require("effect/Effect");
|
|
10
10
|
effect_Effect = require_chunk.__toESM(effect_Effect, 1);
|
|
@@ -23,13 +23,13 @@ node_os = require_chunk.__toESM(node_os, 1);
|
|
|
23
23
|
let node_path = require("node:path");
|
|
24
24
|
node_path = require_chunk.__toESM(node_path, 1);
|
|
25
25
|
require("effect/unstable/rpc");
|
|
26
|
+
let effect_unstable_process = require("effect/unstable/process");
|
|
26
27
|
let effect_Context = require("effect/Context");
|
|
27
28
|
effect_Context = require_chunk.__toESM(effect_Context, 1);
|
|
28
29
|
let effect_Scope = require("effect/Scope");
|
|
29
30
|
effect_Scope = require_chunk.__toESM(effect_Scope, 1);
|
|
30
31
|
let effect_Stdio = require("effect/Stdio");
|
|
31
32
|
effect_Stdio = require_chunk.__toESM(effect_Stdio, 1);
|
|
32
|
-
let effect_unstable_process = require("effect/unstable/process");
|
|
33
33
|
require("effect/Cause");
|
|
34
34
|
let effect_Deferred = require("effect/Deferred");
|
|
35
35
|
effect_Deferred = require_chunk.__toESM(effect_Deferred, 1);
|
|
@@ -3939,8 +3939,22 @@ function extractTextContentFromToolCallContent(content) {
|
|
|
3939
3939
|
function normalizeToolKind(kind) {
|
|
3940
3940
|
return typeof kind === "string" && kind.trim().length > 0 ? kind.trim() : void 0;
|
|
3941
3941
|
}
|
|
3942
|
-
function
|
|
3943
|
-
|
|
3942
|
+
function containsSubagentKeyword(value) {
|
|
3943
|
+
return value !== void 0 && /\b(sub[-\s]?agent|subtask|delegate|delegation)\b/i.test(value);
|
|
3944
|
+
}
|
|
3945
|
+
function hasExplicitSubagentType(data) {
|
|
3946
|
+
const subagentType = (isRecord$1(data?.rawInput) ? data.rawInput : void 0)?.subagent_type;
|
|
3947
|
+
return typeof subagentType === "string" && subagentType.trim().length > 0;
|
|
3948
|
+
}
|
|
3949
|
+
function isAcpSubagentToolCall(input) {
|
|
3950
|
+
if (containsSubagentKeyword(input.kind) || containsSubagentKeyword(input.title) || containsSubagentKeyword(input.command) || containsSubagentKeyword(input.detail)) return true;
|
|
3951
|
+
if (hasExplicitSubagentType(input.data)) return true;
|
|
3952
|
+
const rawInput = isRecord$1(input.data?.rawInput) ? input.data.rawInput : void 0;
|
|
3953
|
+
return containsSubagentKeyword(typeof rawInput?.tool === "string" ? rawInput.tool : void 0) || containsSubagentKeyword(typeof rawInput?.name === "string" ? rawInput.name : void 0);
|
|
3954
|
+
}
|
|
3955
|
+
function canonicalItemTypeFromAcpTool(input) {
|
|
3956
|
+
if (isAcpSubagentToolCall(input)) return "collab_agent_tool_call";
|
|
3957
|
+
switch (input.kind) {
|
|
3944
3958
|
case "execute": return "command_execution";
|
|
3945
3959
|
case "edit":
|
|
3946
3960
|
case "delete":
|
|
@@ -3950,6 +3964,46 @@ function canonicalItemTypeFromAcpToolKind$1(kind) {
|
|
|
3950
3964
|
default: return "dynamic_tool_call";
|
|
3951
3965
|
}
|
|
3952
3966
|
}
|
|
3967
|
+
function acpSubagentStatusFromToolStatus(status) {
|
|
3968
|
+
switch (status) {
|
|
3969
|
+
case "pending": return "starting";
|
|
3970
|
+
case "inProgress": return "running";
|
|
3971
|
+
case "completed": return "completed";
|
|
3972
|
+
case "failed": return "failed";
|
|
3973
|
+
default: return;
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
function rawInputStringField(data, field) {
|
|
3977
|
+
const rawInput = isRecord$1(data?.rawInput) ? data.rawInput : void 0;
|
|
3978
|
+
if (!rawInput) return;
|
|
3979
|
+
const value = rawInput[field];
|
|
3980
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
3981
|
+
}
|
|
3982
|
+
function makeAcpSubagentSummaryState(input) {
|
|
3983
|
+
if (!isAcpSubagentToolCall(input)) return;
|
|
3984
|
+
const label = input.title ?? rawInputStringField(input.data, "name") ?? "ACP subagent";
|
|
3985
|
+
const detail = input.detail ?? rawInputStringField(input.data, "description") ?? rawInputStringField(input.data, "prompt") ?? input.command;
|
|
3986
|
+
const metadata = Object.fromEntries([
|
|
3987
|
+
["source", "acp.tool_call"],
|
|
3988
|
+
["kind", input.kind],
|
|
3989
|
+
["command", input.command]
|
|
3990
|
+
].filter(([, value]) => value !== void 0));
|
|
3991
|
+
const status = acpSubagentStatusFromToolStatus(input.status);
|
|
3992
|
+
return {
|
|
3993
|
+
subagent: {
|
|
3994
|
+
subagentId: require_collectUint8StreamText.RuntimeSubagentId.make(input.toolCallId),
|
|
3995
|
+
origin: "inferred",
|
|
3996
|
+
capability: "summary",
|
|
3997
|
+
label,
|
|
3998
|
+
...detail ? { description: detail } : {},
|
|
3999
|
+
parentProviderItemId: require_collectUint8StreamText.ProviderItemId.make(input.toolCallId),
|
|
4000
|
+
metadata
|
|
4001
|
+
},
|
|
4002
|
+
...status ? { status } : {},
|
|
4003
|
+
summary: label,
|
|
4004
|
+
...detail ? { detail } : {}
|
|
4005
|
+
};
|
|
4006
|
+
}
|
|
3953
4007
|
function makeToolCallState(input, options) {
|
|
3954
4008
|
const toolCallId = input.toolCallId.trim();
|
|
3955
4009
|
if (!toolCallId) return;
|
|
@@ -3967,13 +4021,28 @@ function makeToolCallState(input, options) {
|
|
|
3967
4021
|
if (input.locations !== void 0) data.locations = input.locations;
|
|
3968
4022
|
const fallbackDetail = command ?? normalizedTitle ?? textContent;
|
|
3969
4023
|
const presentation = title !== void 0 || kind !== void 0 || command !== void 0 || normalizedTitle !== void 0 || textContent !== void 0 ? deriveToolActivityPresentation({
|
|
3970
|
-
itemType:
|
|
4024
|
+
itemType: canonicalItemTypeFromAcpTool({
|
|
4025
|
+
kind,
|
|
4026
|
+
title,
|
|
4027
|
+
command,
|
|
4028
|
+
detail: fallbackDetail,
|
|
4029
|
+
data
|
|
4030
|
+
}),
|
|
3971
4031
|
title,
|
|
3972
4032
|
detail: fallbackDetail,
|
|
3973
4033
|
data,
|
|
3974
4034
|
fallbackSummary: title ?? "Tool"
|
|
3975
4035
|
}) : void 0;
|
|
3976
4036
|
const status = normalizeToolCallStatus(input.status, options?.fallbackStatus);
|
|
4037
|
+
const subagent = makeAcpSubagentSummaryState({
|
|
4038
|
+
toolCallId,
|
|
4039
|
+
...kind ? { kind } : {},
|
|
4040
|
+
...presentation?.summary ? { title: presentation.summary } : {},
|
|
4041
|
+
...status ? { status } : {},
|
|
4042
|
+
...command ? { command } : {},
|
|
4043
|
+
...presentation?.detail ? { detail: presentation.detail } : {},
|
|
4044
|
+
data
|
|
4045
|
+
});
|
|
3977
4046
|
return {
|
|
3978
4047
|
toolCallId,
|
|
3979
4048
|
...kind ? { kind } : {},
|
|
@@ -3981,6 +4050,7 @@ function makeToolCallState(input, options) {
|
|
|
3981
4050
|
...status ? { status } : {},
|
|
3982
4051
|
...command ? { command } : {},
|
|
3983
4052
|
...presentation?.detail ? { detail: presentation.detail } : {},
|
|
4053
|
+
...subagent ? { subagent } : {},
|
|
3984
4054
|
data
|
|
3985
4055
|
};
|
|
3986
4056
|
}
|
|
@@ -4002,6 +4072,19 @@ function mergeToolCallState(previous, next) {
|
|
|
4002
4072
|
const status = next.status ?? previous?.status;
|
|
4003
4073
|
const command = next.command ?? previous?.command;
|
|
4004
4074
|
const detail = next.detail ?? previous?.detail;
|
|
4075
|
+
const data = {
|
|
4076
|
+
...previous?.data,
|
|
4077
|
+
...next.data
|
|
4078
|
+
};
|
|
4079
|
+
const subagent = makeAcpSubagentSummaryState({
|
|
4080
|
+
toolCallId: next.toolCallId,
|
|
4081
|
+
...kind ? { kind } : {},
|
|
4082
|
+
...title ? { title } : {},
|
|
4083
|
+
...status ? { status } : {},
|
|
4084
|
+
...command ? { command } : {},
|
|
4085
|
+
...detail ? { detail } : {},
|
|
4086
|
+
data
|
|
4087
|
+
});
|
|
4005
4088
|
return {
|
|
4006
4089
|
toolCallId: next.toolCallId,
|
|
4007
4090
|
...kind ? { kind } : {},
|
|
@@ -4009,10 +4092,8 @@ function mergeToolCallState(previous, next) {
|
|
|
4009
4092
|
...status ? { status } : {},
|
|
4010
4093
|
...command ? { command } : {},
|
|
4011
4094
|
...detail ? { detail } : {},
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
...next.data
|
|
4015
|
-
}
|
|
4095
|
+
...subagent ? { subagent } : {},
|
|
4096
|
+
data
|
|
4016
4097
|
};
|
|
4017
4098
|
}
|
|
4018
4099
|
function parsePermissionRequest(params) {
|
|
@@ -5105,7 +5186,7 @@ const enrichCursorSnapshot = (input) => {
|
|
|
5105
5186
|
const { settings, snapshot, publishSnapshot } = input;
|
|
5106
5187
|
const stampIdentity = input.stampIdentity ?? ((value) => value);
|
|
5107
5188
|
if (!settings.enabled || snapshot.auth.status === "unauthenticated") return effect.Effect.void;
|
|
5108
|
-
return require_bin.enrichProviderSnapshotWithVersionAdvisory(snapshot, input.maintenanceCapabilities).pipe(effect.Effect.provideService(effect_unstable_http.HttpClient.HttpClient, input.httpClient), effect.Effect.flatMap((enrichedSnapshot) => publishSnapshot(stampIdentity(enrichedSnapshot)).pipe(effect.Effect.asVoid)), effect.Effect.catchCause((cause) => effect.Effect.logWarning("Cursor version advisory enrichment failed", { cause: effect.Cause.pretty(cause) }).pipe(effect.Effect.asVoid)));
|
|
5189
|
+
return require_bin.enrichProviderSnapshotWithVersionAdvisory(snapshot, input.maintenanceCapabilities).pipe(effect.Effect.provideService(effect_unstable_http.HttpClient.HttpClient, input.httpClient), effect.Effect.provideService(require_bin.ServerSettingsService, input.serverSettings), effect.Effect.flatMap((enrichedSnapshot) => publishSnapshot(stampIdentity(enrichedSnapshot)).pipe(effect.Effect.asVoid)), effect.Effect.catchCause((cause) => effect.Effect.logWarning("Cursor version advisory enrichment failed", { cause: effect.Cause.pretty(cause) }).pipe(effect.Effect.asVoid)));
|
|
5109
5190
|
};
|
|
5110
5191
|
//#endregion
|
|
5111
5192
|
//#region src/provider/acp/CursorAcpSupport.ts
|
|
@@ -5347,8 +5428,9 @@ function canonicalRequestTypeFromAcpKind(kind) {
|
|
|
5347
5428
|
default: return "unknown";
|
|
5348
5429
|
}
|
|
5349
5430
|
}
|
|
5350
|
-
function
|
|
5351
|
-
|
|
5431
|
+
function canonicalItemTypeFromAcpToolCall(toolCall) {
|
|
5432
|
+
if (isAcpSubagentToolCall(toolCall)) return "collab_agent_tool_call";
|
|
5433
|
+
switch (toolCall.kind) {
|
|
5352
5434
|
case "execute": return "command_execution";
|
|
5353
5435
|
case "edit":
|
|
5354
5436
|
case "delete":
|
|
@@ -5426,7 +5508,7 @@ function makeAcpToolCallEvent(input) {
|
|
|
5426
5508
|
turnId: input.turnId,
|
|
5427
5509
|
itemId: require_collectUint8StreamText.RuntimeItemId.make(input.toolCall.toolCallId),
|
|
5428
5510
|
payload: {
|
|
5429
|
-
itemType:
|
|
5511
|
+
itemType: canonicalItemTypeFromAcpToolCall(input.toolCall),
|
|
5430
5512
|
...runtimeStatus ? { status: runtimeStatus } : {},
|
|
5431
5513
|
...input.toolCall.title ? { title: input.toolCall.title } : {},
|
|
5432
5514
|
...input.toolCall.detail ? { detail: input.toolCall.detail } : {},
|
|
@@ -5636,6 +5718,66 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5636
5718
|
createdAt: nowIso
|
|
5637
5719
|
});
|
|
5638
5720
|
const offerRuntimeEvent = (event) => effect.PubSub.publish(runtimeEventPubSub, event).pipe(effect.Effect.asVoid);
|
|
5721
|
+
const offerAcpSubagentRuntimeEvents = effect.Effect.fn("offerAcpSubagentRuntimeEvents")(function* (ctx, subagentState, rawPayload) {
|
|
5722
|
+
if (!subagentState) return;
|
|
5723
|
+
const subagentId = String(subagentState.subagent.subagentId);
|
|
5724
|
+
if (!ctx.startedSubagentIds.has(subagentId)) {
|
|
5725
|
+
ctx.startedSubagentIds.add(subagentId);
|
|
5726
|
+
yield* offerRuntimeEvent({
|
|
5727
|
+
type: "subagent.started",
|
|
5728
|
+
...yield* makeEventStamp(),
|
|
5729
|
+
provider: PROVIDER,
|
|
5730
|
+
threadId: ctx.threadId,
|
|
5731
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5732
|
+
payload: { subagent: subagentState.subagent },
|
|
5733
|
+
raw: {
|
|
5734
|
+
source: "acp.jsonrpc",
|
|
5735
|
+
method: "session/update",
|
|
5736
|
+
payload: rawPayload
|
|
5737
|
+
}
|
|
5738
|
+
});
|
|
5739
|
+
}
|
|
5740
|
+
if (subagentState.status === "completed" || subagentState.status === "failed" || subagentState.status === "stopped") {
|
|
5741
|
+
if (ctx.completedSubagentIds.has(subagentId)) return;
|
|
5742
|
+
ctx.completedSubagentIds.add(subagentId);
|
|
5743
|
+
yield* offerRuntimeEvent({
|
|
5744
|
+
type: "subagent.completed",
|
|
5745
|
+
...yield* makeEventStamp(),
|
|
5746
|
+
provider: PROVIDER,
|
|
5747
|
+
threadId: ctx.threadId,
|
|
5748
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5749
|
+
payload: {
|
|
5750
|
+
subagent: subagentState.subagent,
|
|
5751
|
+
status: subagentState.status,
|
|
5752
|
+
...subagentState.summary ? { summary: subagentState.summary } : {}
|
|
5753
|
+
},
|
|
5754
|
+
raw: {
|
|
5755
|
+
source: "acp.jsonrpc",
|
|
5756
|
+
method: "session/update",
|
|
5757
|
+
payload: rawPayload
|
|
5758
|
+
}
|
|
5759
|
+
});
|
|
5760
|
+
return;
|
|
5761
|
+
}
|
|
5762
|
+
yield* offerRuntimeEvent({
|
|
5763
|
+
type: "subagent.updated",
|
|
5764
|
+
...yield* makeEventStamp(),
|
|
5765
|
+
provider: PROVIDER,
|
|
5766
|
+
threadId: ctx.threadId,
|
|
5767
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5768
|
+
payload: {
|
|
5769
|
+
subagent: subagentState.subagent,
|
|
5770
|
+
...subagentState.status ? { status: subagentState.status } : {},
|
|
5771
|
+
...subagentState.summary ? { summary: subagentState.summary } : {},
|
|
5772
|
+
...subagentState.detail ? { detail: subagentState.detail } : {}
|
|
5773
|
+
},
|
|
5774
|
+
raw: {
|
|
5775
|
+
source: "acp.jsonrpc",
|
|
5776
|
+
method: "session/update",
|
|
5777
|
+
payload: rawPayload
|
|
5778
|
+
}
|
|
5779
|
+
});
|
|
5780
|
+
});
|
|
5639
5781
|
const getThreadSemaphore = (threadId) => effect.SynchronizedRef.modifyEffect(threadLocksRef, (current) => {
|
|
5640
5782
|
const existing = effect.Option.fromNullishOr(current.get(threadId));
|
|
5641
5783
|
return effect.Option.match(existing, {
|
|
@@ -5884,6 +6026,8 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5884
6026
|
pendingApprovals,
|
|
5885
6027
|
pendingUserInputs,
|
|
5886
6028
|
turns: [],
|
|
6029
|
+
startedSubagentIds: /* @__PURE__ */ new Set(),
|
|
6030
|
+
completedSubagentIds: /* @__PURE__ */ new Set(),
|
|
5887
6031
|
lastPlanFingerprint: void 0,
|
|
5888
6032
|
activeTurnId: void 0,
|
|
5889
6033
|
stopped: false
|
|
@@ -5925,6 +6069,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5925
6069
|
toolCall: event.toolCall,
|
|
5926
6070
|
rawPayload: event.rawPayload
|
|
5927
6071
|
}));
|
|
6072
|
+
yield* offerAcpSubagentRuntimeEvents(ctx, event.toolCall.subagent, event.rawPayload);
|
|
5928
6073
|
return;
|
|
5929
6074
|
case "ContentDelta":
|
|
5930
6075
|
yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc");
|
|
@@ -6179,6 +6324,7 @@ const CursorDriver = {
|
|
|
6179
6324
|
const fileSystem = yield* effect.FileSystem.FileSystem;
|
|
6180
6325
|
const path = yield* effect.Path.Path;
|
|
6181
6326
|
const httpClient = yield* effect_unstable_http.HttpClient.HttpClient;
|
|
6327
|
+
const serverSettings = yield* require_bin.ServerSettingsService;
|
|
6182
6328
|
const eventLoggers = yield* require_bin.ProviderEventLoggers;
|
|
6183
6329
|
const processEnv = require_bin.mergeProviderInstanceEnvironment(environment);
|
|
6184
6330
|
const continuationIdentity = require_ProviderDriver.defaultProviderContinuationIdentity({
|
|
@@ -6226,7 +6372,8 @@ const CursorDriver = {
|
|
|
6226
6372
|
maintenanceCapabilities,
|
|
6227
6373
|
publishSnapshot,
|
|
6228
6374
|
stampIdentity,
|
|
6229
|
-
httpClient
|
|
6375
|
+
httpClient,
|
|
6376
|
+
serverSettings
|
|
6230
6377
|
}),
|
|
6231
6378
|
refreshInterval: null
|
|
6232
6379
|
}).pipe(effect.Effect.mapError((cause) => new require_bin.ProviderDriverError({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { $ as
|
|
6
|
-
import { a as buildIssueContentTitlePrompt, c as extractJsonObject, d as sanitizePrTitle, f as sanitizeThreadTitle, i as buildIssueContentPolishPrompt, n as buildBranchNamePrompt, o as buildPrContentPrompt, r as buildCommitMessagePrompt, s as buildThreadTitlePrompt, t as makeManagedServerProvider, u as sanitizeCommitSubject } from "./makeManagedServerProvider-
|
|
3
|
+
import { Bn as ProviderInstanceId, Sr as TurnId, _r as RuntimeRequestId, gr as RuntimeItemId, hr as ProviderItemId, lr as EventId, nr as ApprovalRequestId, vr as RuntimeSubagentId, x as TextGenerationError, z as CursorSettings, zn as ProviderDriverKind } from "./collectUint8StreamText-Lv4GGI79.mjs";
|
|
4
|
+
import { U as sanitizeBranchFragment, W as sanitizeFeatureBranchName, Y as ServerConfig } from "./Metrics-6Xj17Se3.mjs";
|
|
5
|
+
import { $t as makeProviderMaintenanceCapabilities, D as collectStreamAsString, E as buildServerProvider, F as ProviderAdapterRequestError, I as ProviderAdapterSessionClosedError, L as ProviderAdapterSessionNotFoundError, M as providerModelsFromSettings, P as ProviderAdapterProcessError, R as ProviderAdapterValidationError, T as buildSelectOptionDescriptor, Xt as enrichProviderSnapshotWithVersionAdvisory, an as resolveAttachmentPath, cn as createModelCapabilities, dn as getProviderOptionBooleanSelectionValue, en as makeStaticProviderMaintenanceResolver, g as makeEventNdjsonLogger, h as ProviderEventLoggers, in as ServerSettingsService, k as isCommandMissingCause, mn as getProviderOptionStringSelectionValue, nn as resolveProviderMaintenanceCapabilitiesEffect, w as buildBooleanOptionDescriptor, y as mergeProviderInstanceEnvironment, z as ProviderDriverError } from "./bin.mjs";
|
|
6
|
+
import { a as buildIssueContentTitlePrompt, c as extractJsonObject, d as sanitizePrTitle, f as sanitizeThreadTitle, i as buildIssueContentPolishPrompt, n as buildBranchNamePrompt, o as buildPrContentPrompt, r as buildCommitMessagePrompt, s as buildThreadTitlePrompt, t as makeManagedServerProvider, u as sanitizeCommitSubject } from "./makeManagedServerProvider-CkPEptun.mjs";
|
|
7
7
|
import { t as defaultProviderContinuationIdentity } from "./ProviderDriver-kCV60GKk.mjs";
|
|
8
8
|
import * as Effect$1 from "effect/Effect";
|
|
9
9
|
import * as Layer$1 from "effect/Layer";
|
|
@@ -15,10 +15,10 @@ import { HttpClient } from "effect/unstable/http";
|
|
|
15
15
|
import * as nodeOs from "node:os";
|
|
16
16
|
import * as nodePath from "node:path";
|
|
17
17
|
import "effect/unstable/rpc";
|
|
18
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
|
18
19
|
import * as Context$1 from "effect/Context";
|
|
19
20
|
import "effect/Scope";
|
|
20
21
|
import * as Stdio from "effect/Stdio";
|
|
21
|
-
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
|
22
22
|
import "effect/Cause";
|
|
23
23
|
import * as Deferred$1 from "effect/Deferred";
|
|
24
24
|
import * as Queue$1 from "effect/Queue";
|
|
@@ -3918,8 +3918,22 @@ function extractTextContentFromToolCallContent(content) {
|
|
|
3918
3918
|
function normalizeToolKind(kind) {
|
|
3919
3919
|
return typeof kind === "string" && kind.trim().length > 0 ? kind.trim() : void 0;
|
|
3920
3920
|
}
|
|
3921
|
-
function
|
|
3922
|
-
|
|
3921
|
+
function containsSubagentKeyword(value) {
|
|
3922
|
+
return value !== void 0 && /\b(sub[-\s]?agent|subtask|delegate|delegation)\b/i.test(value);
|
|
3923
|
+
}
|
|
3924
|
+
function hasExplicitSubagentType(data) {
|
|
3925
|
+
const subagentType = (isRecord$1(data?.rawInput) ? data.rawInput : void 0)?.subagent_type;
|
|
3926
|
+
return typeof subagentType === "string" && subagentType.trim().length > 0;
|
|
3927
|
+
}
|
|
3928
|
+
function isAcpSubagentToolCall(input) {
|
|
3929
|
+
if (containsSubagentKeyword(input.kind) || containsSubagentKeyword(input.title) || containsSubagentKeyword(input.command) || containsSubagentKeyword(input.detail)) return true;
|
|
3930
|
+
if (hasExplicitSubagentType(input.data)) return true;
|
|
3931
|
+
const rawInput = isRecord$1(input.data?.rawInput) ? input.data.rawInput : void 0;
|
|
3932
|
+
return containsSubagentKeyword(typeof rawInput?.tool === "string" ? rawInput.tool : void 0) || containsSubagentKeyword(typeof rawInput?.name === "string" ? rawInput.name : void 0);
|
|
3933
|
+
}
|
|
3934
|
+
function canonicalItemTypeFromAcpTool(input) {
|
|
3935
|
+
if (isAcpSubagentToolCall(input)) return "collab_agent_tool_call";
|
|
3936
|
+
switch (input.kind) {
|
|
3923
3937
|
case "execute": return "command_execution";
|
|
3924
3938
|
case "edit":
|
|
3925
3939
|
case "delete":
|
|
@@ -3929,6 +3943,46 @@ function canonicalItemTypeFromAcpToolKind$1(kind) {
|
|
|
3929
3943
|
default: return "dynamic_tool_call";
|
|
3930
3944
|
}
|
|
3931
3945
|
}
|
|
3946
|
+
function acpSubagentStatusFromToolStatus(status) {
|
|
3947
|
+
switch (status) {
|
|
3948
|
+
case "pending": return "starting";
|
|
3949
|
+
case "inProgress": return "running";
|
|
3950
|
+
case "completed": return "completed";
|
|
3951
|
+
case "failed": return "failed";
|
|
3952
|
+
default: return;
|
|
3953
|
+
}
|
|
3954
|
+
}
|
|
3955
|
+
function rawInputStringField(data, field) {
|
|
3956
|
+
const rawInput = isRecord$1(data?.rawInput) ? data.rawInput : void 0;
|
|
3957
|
+
if (!rawInput) return;
|
|
3958
|
+
const value = rawInput[field];
|
|
3959
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
3960
|
+
}
|
|
3961
|
+
function makeAcpSubagentSummaryState(input) {
|
|
3962
|
+
if (!isAcpSubagentToolCall(input)) return;
|
|
3963
|
+
const label = input.title ?? rawInputStringField(input.data, "name") ?? "ACP subagent";
|
|
3964
|
+
const detail = input.detail ?? rawInputStringField(input.data, "description") ?? rawInputStringField(input.data, "prompt") ?? input.command;
|
|
3965
|
+
const metadata = Object.fromEntries([
|
|
3966
|
+
["source", "acp.tool_call"],
|
|
3967
|
+
["kind", input.kind],
|
|
3968
|
+
["command", input.command]
|
|
3969
|
+
].filter(([, value]) => value !== void 0));
|
|
3970
|
+
const status = acpSubagentStatusFromToolStatus(input.status);
|
|
3971
|
+
return {
|
|
3972
|
+
subagent: {
|
|
3973
|
+
subagentId: RuntimeSubagentId.make(input.toolCallId),
|
|
3974
|
+
origin: "inferred",
|
|
3975
|
+
capability: "summary",
|
|
3976
|
+
label,
|
|
3977
|
+
...detail ? { description: detail } : {},
|
|
3978
|
+
parentProviderItemId: ProviderItemId.make(input.toolCallId),
|
|
3979
|
+
metadata
|
|
3980
|
+
},
|
|
3981
|
+
...status ? { status } : {},
|
|
3982
|
+
summary: label,
|
|
3983
|
+
...detail ? { detail } : {}
|
|
3984
|
+
};
|
|
3985
|
+
}
|
|
3932
3986
|
function makeToolCallState(input, options) {
|
|
3933
3987
|
const toolCallId = input.toolCallId.trim();
|
|
3934
3988
|
if (!toolCallId) return;
|
|
@@ -3946,13 +4000,28 @@ function makeToolCallState(input, options) {
|
|
|
3946
4000
|
if (input.locations !== void 0) data.locations = input.locations;
|
|
3947
4001
|
const fallbackDetail = command ?? normalizedTitle ?? textContent;
|
|
3948
4002
|
const presentation = title !== void 0 || kind !== void 0 || command !== void 0 || normalizedTitle !== void 0 || textContent !== void 0 ? deriveToolActivityPresentation({
|
|
3949
|
-
itemType:
|
|
4003
|
+
itemType: canonicalItemTypeFromAcpTool({
|
|
4004
|
+
kind,
|
|
4005
|
+
title,
|
|
4006
|
+
command,
|
|
4007
|
+
detail: fallbackDetail,
|
|
4008
|
+
data
|
|
4009
|
+
}),
|
|
3950
4010
|
title,
|
|
3951
4011
|
detail: fallbackDetail,
|
|
3952
4012
|
data,
|
|
3953
4013
|
fallbackSummary: title ?? "Tool"
|
|
3954
4014
|
}) : void 0;
|
|
3955
4015
|
const status = normalizeToolCallStatus(input.status, options?.fallbackStatus);
|
|
4016
|
+
const subagent = makeAcpSubagentSummaryState({
|
|
4017
|
+
toolCallId,
|
|
4018
|
+
...kind ? { kind } : {},
|
|
4019
|
+
...presentation?.summary ? { title: presentation.summary } : {},
|
|
4020
|
+
...status ? { status } : {},
|
|
4021
|
+
...command ? { command } : {},
|
|
4022
|
+
...presentation?.detail ? { detail: presentation.detail } : {},
|
|
4023
|
+
data
|
|
4024
|
+
});
|
|
3956
4025
|
return {
|
|
3957
4026
|
toolCallId,
|
|
3958
4027
|
...kind ? { kind } : {},
|
|
@@ -3960,6 +4029,7 @@ function makeToolCallState(input, options) {
|
|
|
3960
4029
|
...status ? { status } : {},
|
|
3961
4030
|
...command ? { command } : {},
|
|
3962
4031
|
...presentation?.detail ? { detail: presentation.detail } : {},
|
|
4032
|
+
...subagent ? { subagent } : {},
|
|
3963
4033
|
data
|
|
3964
4034
|
};
|
|
3965
4035
|
}
|
|
@@ -3981,6 +4051,19 @@ function mergeToolCallState(previous, next) {
|
|
|
3981
4051
|
const status = next.status ?? previous?.status;
|
|
3982
4052
|
const command = next.command ?? previous?.command;
|
|
3983
4053
|
const detail = next.detail ?? previous?.detail;
|
|
4054
|
+
const data = {
|
|
4055
|
+
...previous?.data,
|
|
4056
|
+
...next.data
|
|
4057
|
+
};
|
|
4058
|
+
const subagent = makeAcpSubagentSummaryState({
|
|
4059
|
+
toolCallId: next.toolCallId,
|
|
4060
|
+
...kind ? { kind } : {},
|
|
4061
|
+
...title ? { title } : {},
|
|
4062
|
+
...status ? { status } : {},
|
|
4063
|
+
...command ? { command } : {},
|
|
4064
|
+
...detail ? { detail } : {},
|
|
4065
|
+
data
|
|
4066
|
+
});
|
|
3984
4067
|
return {
|
|
3985
4068
|
toolCallId: next.toolCallId,
|
|
3986
4069
|
...kind ? { kind } : {},
|
|
@@ -3988,10 +4071,8 @@ function mergeToolCallState(previous, next) {
|
|
|
3988
4071
|
...status ? { status } : {},
|
|
3989
4072
|
...command ? { command } : {},
|
|
3990
4073
|
...detail ? { detail } : {},
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
...next.data
|
|
3994
|
-
}
|
|
4074
|
+
...subagent ? { subagent } : {},
|
|
4075
|
+
data
|
|
3995
4076
|
};
|
|
3996
4077
|
}
|
|
3997
4078
|
function parsePermissionRequest(params) {
|
|
@@ -5084,7 +5165,7 @@ const enrichCursorSnapshot = (input) => {
|
|
|
5084
5165
|
const { settings, snapshot, publishSnapshot } = input;
|
|
5085
5166
|
const stampIdentity = input.stampIdentity ?? ((value) => value);
|
|
5086
5167
|
if (!settings.enabled || snapshot.auth.status === "unauthenticated") return Effect.void;
|
|
5087
|
-
return enrichProviderSnapshotWithVersionAdvisory(snapshot, input.maintenanceCapabilities).pipe(Effect.provideService(HttpClient.HttpClient, input.httpClient), Effect.flatMap((enrichedSnapshot) => publishSnapshot(stampIdentity(enrichedSnapshot)).pipe(Effect.asVoid)), Effect.catchCause((cause) => Effect.logWarning("Cursor version advisory enrichment failed", { cause: Cause.pretty(cause) }).pipe(Effect.asVoid)));
|
|
5168
|
+
return enrichProviderSnapshotWithVersionAdvisory(snapshot, input.maintenanceCapabilities).pipe(Effect.provideService(HttpClient.HttpClient, input.httpClient), Effect.provideService(ServerSettingsService, input.serverSettings), Effect.flatMap((enrichedSnapshot) => publishSnapshot(stampIdentity(enrichedSnapshot)).pipe(Effect.asVoid)), Effect.catchCause((cause) => Effect.logWarning("Cursor version advisory enrichment failed", { cause: Cause.pretty(cause) }).pipe(Effect.asVoid)));
|
|
5088
5169
|
};
|
|
5089
5170
|
//#endregion
|
|
5090
5171
|
//#region src/provider/acp/CursorAcpSupport.ts
|
|
@@ -5326,8 +5407,9 @@ function canonicalRequestTypeFromAcpKind(kind) {
|
|
|
5326
5407
|
default: return "unknown";
|
|
5327
5408
|
}
|
|
5328
5409
|
}
|
|
5329
|
-
function
|
|
5330
|
-
|
|
5410
|
+
function canonicalItemTypeFromAcpToolCall(toolCall) {
|
|
5411
|
+
if (isAcpSubagentToolCall(toolCall)) return "collab_agent_tool_call";
|
|
5412
|
+
switch (toolCall.kind) {
|
|
5331
5413
|
case "execute": return "command_execution";
|
|
5332
5414
|
case "edit":
|
|
5333
5415
|
case "delete":
|
|
@@ -5405,7 +5487,7 @@ function makeAcpToolCallEvent(input) {
|
|
|
5405
5487
|
turnId: input.turnId,
|
|
5406
5488
|
itemId: RuntimeItemId.make(input.toolCall.toolCallId),
|
|
5407
5489
|
payload: {
|
|
5408
|
-
itemType:
|
|
5490
|
+
itemType: canonicalItemTypeFromAcpToolCall(input.toolCall),
|
|
5409
5491
|
...runtimeStatus ? { status: runtimeStatus } : {},
|
|
5410
5492
|
...input.toolCall.title ? { title: input.toolCall.title } : {},
|
|
5411
5493
|
...input.toolCall.detail ? { detail: input.toolCall.detail } : {},
|
|
@@ -5615,6 +5697,66 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5615
5697
|
createdAt: nowIso
|
|
5616
5698
|
});
|
|
5617
5699
|
const offerRuntimeEvent = (event) => PubSub.publish(runtimeEventPubSub, event).pipe(Effect.asVoid);
|
|
5700
|
+
const offerAcpSubagentRuntimeEvents = Effect.fn("offerAcpSubagentRuntimeEvents")(function* (ctx, subagentState, rawPayload) {
|
|
5701
|
+
if (!subagentState) return;
|
|
5702
|
+
const subagentId = String(subagentState.subagent.subagentId);
|
|
5703
|
+
if (!ctx.startedSubagentIds.has(subagentId)) {
|
|
5704
|
+
ctx.startedSubagentIds.add(subagentId);
|
|
5705
|
+
yield* offerRuntimeEvent({
|
|
5706
|
+
type: "subagent.started",
|
|
5707
|
+
...yield* makeEventStamp(),
|
|
5708
|
+
provider: PROVIDER,
|
|
5709
|
+
threadId: ctx.threadId,
|
|
5710
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5711
|
+
payload: { subagent: subagentState.subagent },
|
|
5712
|
+
raw: {
|
|
5713
|
+
source: "acp.jsonrpc",
|
|
5714
|
+
method: "session/update",
|
|
5715
|
+
payload: rawPayload
|
|
5716
|
+
}
|
|
5717
|
+
});
|
|
5718
|
+
}
|
|
5719
|
+
if (subagentState.status === "completed" || subagentState.status === "failed" || subagentState.status === "stopped") {
|
|
5720
|
+
if (ctx.completedSubagentIds.has(subagentId)) return;
|
|
5721
|
+
ctx.completedSubagentIds.add(subagentId);
|
|
5722
|
+
yield* offerRuntimeEvent({
|
|
5723
|
+
type: "subagent.completed",
|
|
5724
|
+
...yield* makeEventStamp(),
|
|
5725
|
+
provider: PROVIDER,
|
|
5726
|
+
threadId: ctx.threadId,
|
|
5727
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5728
|
+
payload: {
|
|
5729
|
+
subagent: subagentState.subagent,
|
|
5730
|
+
status: subagentState.status,
|
|
5731
|
+
...subagentState.summary ? { summary: subagentState.summary } : {}
|
|
5732
|
+
},
|
|
5733
|
+
raw: {
|
|
5734
|
+
source: "acp.jsonrpc",
|
|
5735
|
+
method: "session/update",
|
|
5736
|
+
payload: rawPayload
|
|
5737
|
+
}
|
|
5738
|
+
});
|
|
5739
|
+
return;
|
|
5740
|
+
}
|
|
5741
|
+
yield* offerRuntimeEvent({
|
|
5742
|
+
type: "subagent.updated",
|
|
5743
|
+
...yield* makeEventStamp(),
|
|
5744
|
+
provider: PROVIDER,
|
|
5745
|
+
threadId: ctx.threadId,
|
|
5746
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5747
|
+
payload: {
|
|
5748
|
+
subagent: subagentState.subagent,
|
|
5749
|
+
...subagentState.status ? { status: subagentState.status } : {},
|
|
5750
|
+
...subagentState.summary ? { summary: subagentState.summary } : {},
|
|
5751
|
+
...subagentState.detail ? { detail: subagentState.detail } : {}
|
|
5752
|
+
},
|
|
5753
|
+
raw: {
|
|
5754
|
+
source: "acp.jsonrpc",
|
|
5755
|
+
method: "session/update",
|
|
5756
|
+
payload: rawPayload
|
|
5757
|
+
}
|
|
5758
|
+
});
|
|
5759
|
+
});
|
|
5618
5760
|
const getThreadSemaphore = (threadId) => SynchronizedRef.modifyEffect(threadLocksRef, (current) => {
|
|
5619
5761
|
const existing = Option.fromNullishOr(current.get(threadId));
|
|
5620
5762
|
return Option.match(existing, {
|
|
@@ -5863,6 +6005,8 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5863
6005
|
pendingApprovals,
|
|
5864
6006
|
pendingUserInputs,
|
|
5865
6007
|
turns: [],
|
|
6008
|
+
startedSubagentIds: /* @__PURE__ */ new Set(),
|
|
6009
|
+
completedSubagentIds: /* @__PURE__ */ new Set(),
|
|
5866
6010
|
lastPlanFingerprint: void 0,
|
|
5867
6011
|
activeTurnId: void 0,
|
|
5868
6012
|
stopped: false
|
|
@@ -5904,6 +6048,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5904
6048
|
toolCall: event.toolCall,
|
|
5905
6049
|
rawPayload: event.rawPayload
|
|
5906
6050
|
}));
|
|
6051
|
+
yield* offerAcpSubagentRuntimeEvents(ctx, event.toolCall.subagent, event.rawPayload);
|
|
5907
6052
|
return;
|
|
5908
6053
|
case "ContentDelta":
|
|
5909
6054
|
yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc");
|
|
@@ -6158,6 +6303,7 @@ const CursorDriver = {
|
|
|
6158
6303
|
const fileSystem = yield* FileSystem.FileSystem;
|
|
6159
6304
|
const path = yield* Path.Path;
|
|
6160
6305
|
const httpClient = yield* HttpClient.HttpClient;
|
|
6306
|
+
const serverSettings = yield* ServerSettingsService;
|
|
6161
6307
|
const eventLoggers = yield* ProviderEventLoggers;
|
|
6162
6308
|
const processEnv = mergeProviderInstanceEnvironment(environment);
|
|
6163
6309
|
const continuationIdentity = defaultProviderContinuationIdentity({
|
|
@@ -6205,7 +6351,8 @@ const CursorDriver = {
|
|
|
6205
6351
|
maintenanceCapabilities,
|
|
6206
6352
|
publishSnapshot,
|
|
6207
6353
|
stampIdentity,
|
|
6208
|
-
httpClient
|
|
6354
|
+
httpClient,
|
|
6355
|
+
serverSettings
|
|
6209
6356
|
}),
|
|
6210
6357
|
refreshInterval: null
|
|
6211
6358
|
}).pipe(Effect.mapError((cause) => new ProviderDriverError({
|
package/dist/{ForgejoSourceControlProvider-D3wP2Cav.cjs → ForgejoSourceControlProvider-BTXRDCGB.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
4
|
-
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-uNXVRHOf.cjs");
|
|
4
|
+
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-DeFR5xH3.cjs");
|
|
5
5
|
const require_bin = require("./bin.cjs");
|
|
6
6
|
let effect = require("effect");
|
|
7
7
|
//#region src/sourceControl/ForgejoSourceControlProvider.ts
|
package/dist/{ForgejoSourceControlProvider-BjCE3730.mjs → ForgejoSourceControlProvider-e-4hvvZ_.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { a as makeForgejoDiscovery,
|
|
5
|
-
import {
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-Lv4GGI79.mjs";
|
|
4
|
+
import { a as makeForgejoDiscovery, l as sourceControlRefFromInput, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-mJV_Xitr.mjs";
|
|
5
|
+
import { qt as ForgejoApi } from "./bin.mjs";
|
|
6
6
|
import { DateTime, Effect, Layer, Option } from "effect";
|
|
7
7
|
//#region src/sourceControl/ForgejoSourceControlProvider.ts
|
|
8
8
|
function providerError(operation, cause) {
|
package/dist/{GitHubSourceControlProvider-DByZ_cnw.mjs → GitHubSourceControlProvider-26IofDAO.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { n as githubDiscovery,
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent, Tn as SOURCE_CONTROL_WORKFLOW_LOG_MAX_BYTES } from "./collectUint8StreamText-Lv4GGI79.mjs";
|
|
4
|
+
import { n as githubDiscovery, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-mJV_Xitr.mjs";
|
|
5
5
|
import { i as parseGitHubRepositoryOwnerFromUrl, t as classifySourceControlCommentAuthorRole } from "./sourceControl-iWG-m4wE.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { Gt as withoutStatusCheckRollupJsonField, Ht as GitHubCli, Kt as decodeGitHubPullRequestListJson, Ut as formatGitHubJsonFields, Vt as GITHUB_PULL_REQUEST_LIST_JSON_FIELDS, Wt as isStatusCheckRollupAccessError } from "./bin.mjs";
|
|
7
7
|
import { DateTime, Effect, FileSystem, Layer, Option, Result, Schema } from "effect";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
//#region src/sourceControl/GitHubSourceControlProvider.ts
|
package/dist/{GitHubSourceControlProvider-DU_7IvMa.cjs → GitHubSourceControlProvider-DWmwkA_y.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
4
|
-
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-uNXVRHOf.cjs");
|
|
4
|
+
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-DeFR5xH3.cjs");
|
|
5
5
|
const require_sourceControl = require("./sourceControl-x2t62T8h.cjs");
|
|
6
6
|
const require_bin = require("./bin.cjs");
|
|
7
7
|
let effect = require("effect");
|
package/dist/{GitLabSourceControlProvider-BVJ5IqTS.cjs → GitLabSourceControlProvider-D-YHnxRe.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
4
|
-
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-uNXVRHOf.cjs");
|
|
4
|
+
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-DeFR5xH3.cjs");
|
|
5
5
|
const require_bin = require("./bin.cjs");
|
|
6
6
|
let effect = require("effect");
|
|
7
7
|
//#region src/sourceControl/GitLabSourceControlProvider.ts
|