ryco-cli 0.1.6 → 0.1.8
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/{AzureDevOpsSourceControlProvider-CC2_COxP.mjs → AzureDevOpsSourceControlProvider-B5vb4DOU.mjs} +2 -2
- package/dist/{AzureDevOpsSourceControlProvider-6holYS_D.cjs → AzureDevOpsSourceControlProvider-CYZmJqSM.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-CYR_BD1d.mjs → BitbucketSourceControlProvider-CcAb4IgH.mjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-a0IsNFyG.cjs → BitbucketSourceControlProvider-D_7i4YQz.cjs} +2 -2
- package/dist/{ClaudeDriver-D3nsxwH9.mjs → ClaudeDriver-CoPBpdrp.mjs} +198 -8
- package/dist/{ClaudeDriver-C6tQNEWO.cjs → ClaudeDriver-ScqmbPKW.cjs} +197 -7
- package/dist/{CodexDriver-ms_YgFD7.cjs → CodexDriver-CtCCc3CC.cjs} +36 -8
- package/dist/{CodexDriver-BILrJG8o.mjs → CodexDriver-DH7vqku4.mjs} +37 -9
- package/dist/{CodexTextGeneration-BIKHl7E3.mjs → CodexTextGeneration-CJV1jPda.mjs} +3 -3
- package/dist/{CodexTextGeneration-CHEgoANm.cjs → CodexTextGeneration-Db2hn8Qz.cjs} +2 -2
- package/dist/{CopilotDriver-CmD3Ffyl.mjs → CopilotDriver-CFCF68Te.mjs} +7 -6
- package/dist/{CopilotDriver-B0--ZwIK.cjs → CopilotDriver-DLN2KEoc.cjs} +6 -5
- package/dist/{CursorDriver-DTVPXZ-R.cjs → CursorDriver-BlvQbOEZ.cjs} +201 -15
- package/dist/{CursorDriver-CbeaIbdb.mjs → CursorDriver-Dej81rwD.mjs} +202 -16
- package/dist/{ForgejoSourceControlProvider-DX6d9gvz.mjs → ForgejoSourceControlProvider-3cFD7SqY.mjs} +2 -2
- package/dist/{ForgejoSourceControlProvider-DwAog76b.cjs → ForgejoSourceControlProvider-DYFUGvBk.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-9lJFzjsu.cjs → GitHubSourceControlProvider-B1Tp0TbY.cjs} +27 -4
- package/dist/{GitHubSourceControlProvider-C-LGwho3.mjs → GitHubSourceControlProvider-Kf4rrBTF.mjs} +27 -4
- package/dist/{GitLabSourceControlProvider-CvKA74lg.cjs → GitLabSourceControlProvider-D3vvKrB4.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-CkeT2aEx.mjs → GitLabSourceControlProvider-Ygppeftk.mjs} +2 -2
- package/dist/{NodeSqliteClient-B5aDHbNc.cjs → NodeSqliteClient-D1O-MR8w.cjs} +4 -1
- package/dist/{NodeSqliteClient-A1TEgwj_.mjs → NodeSqliteClient-DdTjpAko.mjs} +4 -1
- package/dist/{OpenCodeDriver-ClWtCk0j.mjs → OpenCodeDriver-BGa9Tkot.mjs} +326 -39
- package/dist/{OpenCodeDriver-CXUsnl5o.cjs → OpenCodeDriver-mbR9mF54.cjs} +325 -38
- package/dist/{SourceControlProviderDiscoveryCatalog-_rg0mc1o.cjs → SourceControlProviderDiscoveryCatalog-CTb100Uk.cjs} +1 -64
- package/dist/{SourceControlProviderDiscoveryCatalog-yMDer_Yh.mjs → SourceControlProviderDiscoveryCatalog-Zk11tJoL.mjs} +3 -48
- package/dist/bin.cjs +1481 -704
- package/dist/bin.mjs +1435 -659
- package/dist/client/assets/{AnimatedHeight-DgItDSis.js → AnimatedHeight-CPQ2q38I.js} +1 -1
- package/dist/client/assets/AppearanceSettings-B0FYiIxL.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-C_xHEt9C.js → BranchToolbar.logic-C1yjFjxJ.js} +1 -1
- package/dist/client/assets/ChatRightPanel-CJDSKMU2.js +188 -0
- package/dist/client/assets/ChatThreadRouteView-BaKwKGbC.js +1 -0
- package/dist/client/assets/CommandPaletteDialog-BHG_MdZk.js +1 -0
- package/dist/client/assets/CompositeRoot-Bs0hfelE.js +1 -0
- package/dist/client/assets/ConnectionsSettings-DvZNgO60.js +1 -0
- package/dist/client/assets/{DiagnosticsSettings-B340S_mq.js → DiagnosticsSettings-0v_hh1Qh.js} +1 -1
- package/dist/client/assets/{DialogHandle-BJY7cHCV.js → DialogHandle-CwEAVRF_.js} +1 -1
- package/dist/client/assets/{DialogRoot-Ej1FVk-_.js → DialogRoot-CYuaaDI3.js} +1 -1
- package/dist/client/assets/DialogTitle-Cak6zT3u.js +1 -0
- package/dist/client/assets/DialogTrigger-BD0KYYT-.js +1 -0
- package/dist/client/assets/{DialogViewport-DvjAl76K.js → DialogViewport-9sGf4JUp.js} +1 -1
- package/dist/client/assets/{DraftChatThreadRouteView-pOkyeKPS.js → DraftChatThreadRouteView-nvKLHlii.js} +1 -1
- package/dist/client/assets/{JetBrainsIcons-DTTF47I0.js → JetBrainsIcons-CflvH7gO.js} +1 -1
- package/dist/client/assets/KeybindingsSettings-DhLKhgYn.js +7 -0
- package/dist/client/assets/McpServersSettings-COs_dng1.js +6 -0
- package/dist/client/assets/{NoActiveThreadState-DVHwrkCp.js → NoActiveThreadState-cxMCW-cQ.js} +1 -1
- package/dist/client/assets/OpinionatedPluginsSettings-ag_OgOGj.js +1 -0
- package/dist/client/assets/{ProjectFavicon-TDP7HRfn.js → ProjectFavicon-D97Hy4xo.js} +1 -1
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-6TpFsmiI.js → ProviderUpdateLaunchNotification.logic-RMYvRSEk.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-DcdVMRVC.js +1 -0
- package/dist/client/assets/{RedactedSensitiveText-BfoVjPsE.js → RedactedSensitiveText-CQY4pFAq.js} +1 -1
- package/dist/client/assets/RootAppShell-BRjETnaT.js +12 -0
- package/dist/client/assets/SettingsDialog-DRi5jsmq.js +2 -0
- package/dist/client/assets/SourceControlSettings-CdUulS4O.js +1 -0
- package/dist/client/assets/StatisticsPanel-NLU3ecLt.js +64 -0
- package/dist/client/assets/{ThreadStatusIndicators-B0leIJGD.js → ThreadStatusIndicators-CebYbeXP.js} +1 -1
- package/dist/client/assets/{ThreadTerminalDrawer-COq2Fk17.js → ThreadTerminalDrawer-DlI0gGer.js} +17 -17
- package/dist/client/assets/ThreadWorkspacePanel-CEIVrCZ0.js +166 -0
- package/dist/client/assets/{alert-dialog-lMfKpG2t.js → alert-dialog-wh07u3JU.js} +1 -1
- package/dist/client/assets/chart-column-Cg34FxwD.js +1 -0
- package/dist/client/assets/{chatThreadActions-PPyTj_x0.js → chatThreadActions-UitETN_n.js} +1 -1
- package/dist/client/assets/chevron-up-C3DS3evc.js +1 -0
- package/dist/client/assets/{clamp-JiD4IZ0Z.js → clamp-DPbdAzEu.js} +1 -1
- package/dist/client/assets/{clipboard-copy-CYBLSG2q.js → clipboard-copy-ClVNnHW5.js} +1 -1
- package/dist/client/assets/clock-Cr66Pt4W.js +1 -0
- package/dist/client/assets/{commandPaletteStore-uVfCD7zE.js → commandPaletteStore-DzUBFRor.js} +1 -1
- package/dist/client/assets/composerDraftStore-BfLPHwHL.js +21 -0
- package/dist/client/assets/{desktopUpdateAtoms-X6uM5SoD.js → desktopUpdateAtoms-BiqPT2_z.js} +1 -1
- package/dist/client/assets/{download-DLBlpp4h.js → download-DJ1juHK4.js} +1 -1
- package/dist/client/assets/{draft-input-dLlVMl5P.js → draft-input-B1txZFC7.js} +1 -1
- package/dist/client/assets/editorPreferences-Bbmh6Bm1.js +1 -0
- package/dist/client/assets/{empty-DlLY-Hhj.js → empty-CUEYr1p8.js} +1 -1
- package/dist/client/assets/{group-zDBPF7rR.js → group-BouZ2n9F.js} +1 -1
- package/dist/client/assets/{index-Dq8sT2lF.js → index-DiHgOLH_.js} +2 -2
- package/dist/client/assets/{input-B9-RWT56.js → input-Do_m9U-4.js} +1 -1
- package/dist/client/assets/kbd-DJilTfYF.js +1 -0
- package/dist/client/assets/{keybindings-Dx4Nc1vY.js → keybindings-CRkz0yvp.js} +1 -1
- package/dist/client/assets/{keyboard-DDTWQkr0.js → keyboard-D3WgbAUQ.js} +1 -1
- package/dist/client/assets/{keyedQuery-Ds4OGhX2.js → keyedQuery-PQcOnB2O.js} +0 -0
- package/dist/client/assets/{main-DxfpmoKJ.js → main-C-491vdD.js} +2 -2
- package/dist/client/assets/main-fW5L_SdM.css +2 -0
- package/dist/client/assets/{palette-BQcz-ZYV.js → palette-BRoYo327.js} +1 -1
- package/dist/client/assets/{play-QloDGe4R.js → play-BZbHk_vw.js} +1 -1
- package/dist/client/assets/plus-D0S72hZS.js +1 -0
- package/dist/client/assets/projectAtoms-KYCIIuVn.js +1 -0
- package/dist/client/assets/providerDriverMeta-BX4CLldz.js +1 -0
- package/dist/client/assets/providerIconUtils-DTRc3qno.js +47 -0
- package/dist/client/assets/radio-group-De3hRQoY.js +1 -0
- package/dist/client/assets/{refresh-cw-DkBMGllm.js → refresh-cw-D_1NT-T2.js} +1 -1
- package/dist/client/assets/{resolveAriaLabelledBy-DDfIbj05.js → resolveAriaLabelledBy-RblUm3b1.js} +1 -1
- package/dist/client/assets/rightPanelRouteSearch-DLllyqRr.js +1 -0
- package/dist/client/assets/{scale-BActunFu.js → scale-s57Ro96s.js} +1 -1
- package/dist/client/assets/{scroll-area-D-YOUG02.js → scroll-area-B0_k8-iT.js} +1 -1
- package/dist/client/assets/{separator-TInKeIDo.js → separator-AyXRgdnJ.js} +1 -1
- package/dist/client/assets/{server-BtEG3NAw.js → server-Z-m1OqE5.js} +1 -1
- package/dist/client/assets/{session-logic-DNf1aXq_.js → session-logic-B87Htlw4.js} +2 -2
- package/dist/client/assets/settingsDialogStore-CxUfUnd9.js +1 -0
- package/dist/client/assets/{settingsLayout-D22Mm0u3.js → settingsLayout-BtKS3Z8f.js} +1 -1
- package/dist/client/assets/sidebar-B0WxOej2.js +1 -0
- package/dist/client/assets/sidebarStatusText-C_EsHj20.js +1 -0
- package/dist/client/assets/{skeleton-DWaac_qp.js → skeleton-COt2Az5i.js} +1 -1
- package/dist/client/assets/{storeSelectors-Cx1IYPA4.js → storeSelectors-BuB4Kzj6.js} +1 -1
- package/dist/client/assets/threadSelectionStore-BS6X6HHt.js +1 -0
- package/dist/client/assets/toast-CaV8TQi_.js +1 -0
- package/dist/client/assets/toggle-DE4ApNIU.js +1 -0
- package/dist/client/assets/{toggle-group-CnLjaHSL.js → toggle-group-BuzAkAEk.js} +1 -1
- package/dist/client/assets/{tokenModePresentation-BSYdIvBm.js → tokenModePresentation-BCL2aeat.js} +1 -1
- package/dist/client/assets/{trash-2-BI5xcbsm.js → trash-2-ZZ1feCT6.js} +1 -1
- package/dist/client/assets/{triangle-alert-DJef_Uvh.js → triangle-alert-CL3zqnKL.js} +1 -1
- package/dist/client/assets/{undo-2-DeZ2cMGS.js → undo-2-Cu9H3R3q.js} +1 -1
- package/dist/client/assets/{useHandleNewThread-XB82O6SA.js → useHandleNewThread-Gke-ZFBr.js} +1 -1
- package/dist/client/assets/useLabelableId-DfuxWqrk.js +1 -0
- package/dist/client/assets/{useNavigate-B2tgshhW.js → useNavigate-DQEHh6ky.js} +1 -1
- package/dist/client/assets/useTheme-HcKmBfpF.js +1 -0
- package/dist/client/assets/{vscode-icons-DM9qFoEr.js → vscode-icons-DGDiHkqG.js} +1 -1
- package/dist/client/assets/{wrench-je4QOyG-.js → wrench-C_OATMLq.js} +1 -1
- package/dist/client/assets/x-BG9zZGeD.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/{collectUint8StreamText-TCG6xW_P.cjs → collectUint8StreamText-B-GW3u_2.cjs} +367 -15
- package/dist/{collectUint8StreamText-C2z5Y8tF.mjs → collectUint8StreamText-COE2_gie.mjs} +345 -17
- package/dist/{makeManagedServerProvider-BXO8QvzC.mjs → makeManagedServerProvider-D1_iEWGi.mjs} +1 -1
- package/dist/{makeManagedServerProvider-DPFw9gV_.cjs → makeManagedServerProvider-DTsQ87HL.cjs} +1 -1
- package/package.json +4 -2
- package/dist/client/assets/AppearanceSettings-BlsMFBvJ.js +0 -1
- package/dist/client/assets/ChatRightPanel-CThudBb1.js +0 -188
- package/dist/client/assets/ChatThreadRouteView-CV6ETYG5.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-C_H7R8S5.js +0 -1
- package/dist/client/assets/CompositeRoot-DjnzUIwC.js +0 -1
- package/dist/client/assets/ConnectionsSettings-hArR4Oe3.js +0 -1
- package/dist/client/assets/DialogTitle-H1yIMmA9.js +0 -1
- package/dist/client/assets/DialogTrigger-BHMq_K2G.js +0 -1
- package/dist/client/assets/KeybindingsSettings-CW3RRi-7.js +0 -7
- package/dist/client/assets/McpServersSettings-dQ3BzOWY.js +0 -6
- package/dist/client/assets/OpinionatedPluginsSettings-Cjj23Fs4.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-D15EeWAq.js +0 -1
- package/dist/client/assets/RootAppShell-CWBPSA2w.js +0 -12
- package/dist/client/assets/SettingsDialog-oJCE5foT.js +0 -2
- package/dist/client/assets/SourceControlSettings-CPnlMxNm.js +0 -1
- package/dist/client/assets/ThreadWorkspacePanel-qF9y6QT9.js +0 -166
- package/dist/client/assets/composerDraftStore-D12lUSfh.js +0 -21
- package/dist/client/assets/editorPreferences-BLeEBSD_.js +0 -1
- package/dist/client/assets/folder-open-DMjz0lpx.js +0 -1
- package/dist/client/assets/kbd-aeSsjiPI.js +0 -1
- package/dist/client/assets/main-C57RhHZ_.css +0 -2
- package/dist/client/assets/plus-4Oy56d-3.js +0 -1
- package/dist/client/assets/projectAtoms-DUEBb7Zz.js +0 -1
- package/dist/client/assets/providerDriverMeta-Dwi6Zqgd.js +0 -1
- package/dist/client/assets/providerIconUtils-uhWb4bdg.js +0 -47
- package/dist/client/assets/radio-group-DHyQlLeX.js +0 -1
- package/dist/client/assets/rightPanelRouteSearch-DfuWVvXN.js +0 -1
- package/dist/client/assets/settingsDialogStore-BINi7pdD.js +0 -1
- package/dist/client/assets/sidebar-DHwNQmWp.js +0 -1
- package/dist/client/assets/threadSelectionStore-C0ig4405.js +0 -1
- package/dist/client/assets/toast-DE7a4wkW.js +0 -1
- package/dist/client/assets/toggle-BIW4AyPY.js +0 -1
- package/dist/client/assets/useLabelableId-DBAgv9qQ.js +0 -1
- package/dist/client/assets/useTheme-Dv42Z8uy.js +0 -1
- package/dist/client/assets/x-fI9snvD3.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
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-COE2_gie.mjs";
|
|
4
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, en as makeStaticProviderMaintenanceResolver, g as makeEventNdjsonLogger, h as ProviderEventLoggers, in 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-
|
|
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-D1_iEWGi.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";
|
|
@@ -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) {
|
|
@@ -4062,6 +4143,17 @@ function parseSessionUpdateEvent(params) {
|
|
|
4062
4143
|
rawPayload: params
|
|
4063
4144
|
});
|
|
4064
4145
|
break;
|
|
4146
|
+
case "usage_update":
|
|
4147
|
+
if (upd.used > 0) events.push({
|
|
4148
|
+
_tag: "UsageUpdated",
|
|
4149
|
+
usage: {
|
|
4150
|
+
usedTokens: upd.used,
|
|
4151
|
+
lastUsedTokens: upd.used,
|
|
4152
|
+
...upd.size > 0 ? { maxTokens: upd.size } : {}
|
|
4153
|
+
},
|
|
4154
|
+
rawPayload: params
|
|
4155
|
+
});
|
|
4156
|
+
break;
|
|
4065
4157
|
default: break;
|
|
4066
4158
|
}
|
|
4067
4159
|
return {
|
|
@@ -4480,7 +4572,8 @@ const PROVIDER$1 = ProviderDriverKind.make("cursor");
|
|
|
4480
4572
|
const CURSOR_PRESENTATION = {
|
|
4481
4573
|
displayName: "Cursor",
|
|
4482
4574
|
badgeLabel: "Early Access",
|
|
4483
|
-
showInteractionModeToggle: true
|
|
4575
|
+
showInteractionModeToggle: true,
|
|
4576
|
+
supportsAskMode: true
|
|
4484
4577
|
};
|
|
4485
4578
|
const EMPTY_CAPABILITIES = createModelCapabilities({ optionDescriptors: [] });
|
|
4486
4579
|
const CURSOR_ACP_MODEL_DISCOVERY_TIMEOUT_MS = 15e3;
|
|
@@ -5084,7 +5177,7 @@ const enrichCursorSnapshot = (input) => {
|
|
|
5084
5177
|
const { settings, snapshot, publishSnapshot } = input;
|
|
5085
5178
|
const stampIdentity = input.stampIdentity ?? ((value) => value);
|
|
5086
5179
|
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)));
|
|
5180
|
+
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
5181
|
};
|
|
5089
5182
|
//#endregion
|
|
5090
5183
|
//#region src/provider/acp/CursorAcpSupport.ts
|
|
@@ -5326,8 +5419,9 @@ function canonicalRequestTypeFromAcpKind(kind) {
|
|
|
5326
5419
|
default: return "unknown";
|
|
5327
5420
|
}
|
|
5328
5421
|
}
|
|
5329
|
-
function
|
|
5330
|
-
|
|
5422
|
+
function canonicalItemTypeFromAcpToolCall(toolCall) {
|
|
5423
|
+
if (isAcpSubagentToolCall(toolCall)) return "collab_agent_tool_call";
|
|
5424
|
+
switch (toolCall.kind) {
|
|
5331
5425
|
case "execute": return "command_execution";
|
|
5332
5426
|
case "edit":
|
|
5333
5427
|
case "delete":
|
|
@@ -5405,7 +5499,7 @@ function makeAcpToolCallEvent(input) {
|
|
|
5405
5499
|
turnId: input.turnId,
|
|
5406
5500
|
itemId: RuntimeItemId.make(input.toolCall.toolCallId),
|
|
5407
5501
|
payload: {
|
|
5408
|
-
itemType:
|
|
5502
|
+
itemType: canonicalItemTypeFromAcpToolCall(input.toolCall),
|
|
5409
5503
|
...runtimeStatus ? { status: runtimeStatus } : {},
|
|
5410
5504
|
...input.toolCall.title ? { title: input.toolCall.title } : {},
|
|
5411
5505
|
...input.toolCall.detail ? { detail: input.toolCall.detail } : {},
|
|
@@ -5451,6 +5545,21 @@ function makeAcpContentDeltaEvent(input) {
|
|
|
5451
5545
|
}
|
|
5452
5546
|
};
|
|
5453
5547
|
}
|
|
5548
|
+
function makeAcpTokenUsageEvent(input) {
|
|
5549
|
+
return {
|
|
5550
|
+
type: "thread.token-usage.updated",
|
|
5551
|
+
...input.stamp,
|
|
5552
|
+
provider: input.provider,
|
|
5553
|
+
threadId: input.threadId,
|
|
5554
|
+
turnId: input.turnId,
|
|
5555
|
+
payload: { usage: input.usage },
|
|
5556
|
+
raw: {
|
|
5557
|
+
source: "acp.jsonrpc",
|
|
5558
|
+
method: "session/update",
|
|
5559
|
+
payload: input.rawPayload
|
|
5560
|
+
}
|
|
5561
|
+
};
|
|
5562
|
+
}
|
|
5454
5563
|
//#endregion
|
|
5455
5564
|
//#region src/provider/acp/AcpNativeLogging.ts
|
|
5456
5565
|
function writeNativeAcpLog(input) {
|
|
@@ -5565,6 +5674,7 @@ function resolveRequestedModeId(input) {
|
|
|
5565
5674
|
const modeState = input.modeState;
|
|
5566
5675
|
if (!modeState) return;
|
|
5567
5676
|
if (input.interactionMode === "plan") return findModeByAliases(modeState.availableModes, ACP_PLAN_MODE_ALIASES)?.id;
|
|
5677
|
+
if (input.interactionMode === "ask") return findModeByAliases(modeState.availableModes, ACP_APPROVAL_MODE_ALIASES)?.id;
|
|
5568
5678
|
if (input.runtimeMode === "approval-required") return findModeByAliases(modeState.availableModes, ACP_APPROVAL_MODE_ALIASES)?.id ?? findModeByAliases(modeState.availableModes, ACP_IMPLEMENT_MODE_ALIASES)?.id ?? modeState.availableModes.find((mode) => !isPlanMode(mode))?.id ?? modeState.currentModeId;
|
|
5569
5679
|
return findModeByAliases(modeState.availableModes, ACP_IMPLEMENT_MODE_ALIASES)?.id ?? findModeByAliases(modeState.availableModes, ACP_APPROVAL_MODE_ALIASES)?.id ?? modeState.availableModes.find((mode) => !isPlanMode(mode))?.id ?? modeState.currentModeId;
|
|
5570
5680
|
}
|
|
@@ -5615,6 +5725,66 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5615
5725
|
createdAt: nowIso
|
|
5616
5726
|
});
|
|
5617
5727
|
const offerRuntimeEvent = (event) => PubSub.publish(runtimeEventPubSub, event).pipe(Effect.asVoid);
|
|
5728
|
+
const offerAcpSubagentRuntimeEvents = Effect.fn("offerAcpSubagentRuntimeEvents")(function* (ctx, subagentState, rawPayload) {
|
|
5729
|
+
if (!subagentState) return;
|
|
5730
|
+
const subagentId = String(subagentState.subagent.subagentId);
|
|
5731
|
+
if (!ctx.startedSubagentIds.has(subagentId)) {
|
|
5732
|
+
ctx.startedSubagentIds.add(subagentId);
|
|
5733
|
+
yield* offerRuntimeEvent({
|
|
5734
|
+
type: "subagent.started",
|
|
5735
|
+
...yield* makeEventStamp(),
|
|
5736
|
+
provider: PROVIDER,
|
|
5737
|
+
threadId: ctx.threadId,
|
|
5738
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5739
|
+
payload: { subagent: subagentState.subagent },
|
|
5740
|
+
raw: {
|
|
5741
|
+
source: "acp.jsonrpc",
|
|
5742
|
+
method: "session/update",
|
|
5743
|
+
payload: rawPayload
|
|
5744
|
+
}
|
|
5745
|
+
});
|
|
5746
|
+
}
|
|
5747
|
+
if (subagentState.status === "completed" || subagentState.status === "failed" || subagentState.status === "stopped") {
|
|
5748
|
+
if (ctx.completedSubagentIds.has(subagentId)) return;
|
|
5749
|
+
ctx.completedSubagentIds.add(subagentId);
|
|
5750
|
+
yield* offerRuntimeEvent({
|
|
5751
|
+
type: "subagent.completed",
|
|
5752
|
+
...yield* makeEventStamp(),
|
|
5753
|
+
provider: PROVIDER,
|
|
5754
|
+
threadId: ctx.threadId,
|
|
5755
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5756
|
+
payload: {
|
|
5757
|
+
subagent: subagentState.subagent,
|
|
5758
|
+
status: subagentState.status,
|
|
5759
|
+
...subagentState.summary ? { summary: subagentState.summary } : {}
|
|
5760
|
+
},
|
|
5761
|
+
raw: {
|
|
5762
|
+
source: "acp.jsonrpc",
|
|
5763
|
+
method: "session/update",
|
|
5764
|
+
payload: rawPayload
|
|
5765
|
+
}
|
|
5766
|
+
});
|
|
5767
|
+
return;
|
|
5768
|
+
}
|
|
5769
|
+
yield* offerRuntimeEvent({
|
|
5770
|
+
type: "subagent.updated",
|
|
5771
|
+
...yield* makeEventStamp(),
|
|
5772
|
+
provider: PROVIDER,
|
|
5773
|
+
threadId: ctx.threadId,
|
|
5774
|
+
...ctx.activeTurnId ? { turnId: ctx.activeTurnId } : {},
|
|
5775
|
+
payload: {
|
|
5776
|
+
subagent: subagentState.subagent,
|
|
5777
|
+
...subagentState.status ? { status: subagentState.status } : {},
|
|
5778
|
+
...subagentState.summary ? { summary: subagentState.summary } : {},
|
|
5779
|
+
...subagentState.detail ? { detail: subagentState.detail } : {}
|
|
5780
|
+
},
|
|
5781
|
+
raw: {
|
|
5782
|
+
source: "acp.jsonrpc",
|
|
5783
|
+
method: "session/update",
|
|
5784
|
+
payload: rawPayload
|
|
5785
|
+
}
|
|
5786
|
+
});
|
|
5787
|
+
});
|
|
5618
5788
|
const getThreadSemaphore = (threadId) => SynchronizedRef.modifyEffect(threadLocksRef, (current) => {
|
|
5619
5789
|
const existing = Option.fromNullishOr(current.get(threadId));
|
|
5620
5790
|
return Option.match(existing, {
|
|
@@ -5863,6 +6033,8 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5863
6033
|
pendingApprovals,
|
|
5864
6034
|
pendingUserInputs,
|
|
5865
6035
|
turns: [],
|
|
6036
|
+
startedSubagentIds: /* @__PURE__ */ new Set(),
|
|
6037
|
+
completedSubagentIds: /* @__PURE__ */ new Set(),
|
|
5866
6038
|
lastPlanFingerprint: void 0,
|
|
5867
6039
|
activeTurnId: void 0,
|
|
5868
6040
|
stopped: false
|
|
@@ -5904,6 +6076,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5904
6076
|
toolCall: event.toolCall,
|
|
5905
6077
|
rawPayload: event.rawPayload
|
|
5906
6078
|
}));
|
|
6079
|
+
yield* offerAcpSubagentRuntimeEvents(ctx, event.toolCall.subagent, event.rawPayload);
|
|
5907
6080
|
return;
|
|
5908
6081
|
case "ContentDelta":
|
|
5909
6082
|
yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc");
|
|
@@ -5917,6 +6090,17 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
5917
6090
|
rawPayload: event.rawPayload
|
|
5918
6091
|
}));
|
|
5919
6092
|
return;
|
|
6093
|
+
case "UsageUpdated":
|
|
6094
|
+
yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc");
|
|
6095
|
+
yield* offerRuntimeEvent(makeAcpTokenUsageEvent({
|
|
6096
|
+
stamp: yield* makeEventStamp(),
|
|
6097
|
+
provider: PROVIDER,
|
|
6098
|
+
threadId: ctx.threadId,
|
|
6099
|
+
turnId: ctx.activeTurnId,
|
|
6100
|
+
usage: event.usage,
|
|
6101
|
+
rawPayload: event.rawPayload
|
|
6102
|
+
}));
|
|
6103
|
+
return;
|
|
5920
6104
|
}
|
|
5921
6105
|
}))).pipe(Effect.forkChild);
|
|
5922
6106
|
ctx.notificationFiber = nf;
|
|
@@ -6158,6 +6342,7 @@ const CursorDriver = {
|
|
|
6158
6342
|
const fileSystem = yield* FileSystem.FileSystem;
|
|
6159
6343
|
const path = yield* Path.Path;
|
|
6160
6344
|
const httpClient = yield* HttpClient.HttpClient;
|
|
6345
|
+
const serverSettings = yield* ServerSettingsService;
|
|
6161
6346
|
const eventLoggers = yield* ProviderEventLoggers;
|
|
6162
6347
|
const processEnv = mergeProviderInstanceEnvironment(environment);
|
|
6163
6348
|
const continuationIdentity = defaultProviderContinuationIdentity({
|
|
@@ -6205,7 +6390,8 @@ const CursorDriver = {
|
|
|
6205
6390
|
maintenanceCapabilities,
|
|
6206
6391
|
publishSnapshot,
|
|
6207
6392
|
stampIdentity,
|
|
6208
|
-
httpClient
|
|
6393
|
+
httpClient,
|
|
6394
|
+
serverSettings
|
|
6209
6395
|
}),
|
|
6210
6396
|
refreshInterval: null
|
|
6211
6397
|
}).pipe(Effect.mapError((cause) => new ProviderDriverError({
|
package/dist/{ForgejoSourceControlProvider-DX6d9gvz.mjs → ForgejoSourceControlProvider-3cFD7SqY.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { a as makeForgejoDiscovery, l as sourceControlRefFromInput, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
|
+
import { a as makeForgejoDiscovery, l as sourceControlRefFromInput, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-Zk11tJoL.mjs";
|
|
5
5
|
import { qt as ForgejoApi } from "./bin.mjs";
|
|
6
6
|
import { DateTime, Effect, Layer, Option } from "effect";
|
|
7
7
|
//#region src/sourceControl/ForgejoSourceControlProvider.ts
|
package/dist/{ForgejoSourceControlProvider-DwAog76b.cjs → ForgejoSourceControlProvider-DYFUGvBk.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-B-GW3u_2.cjs");
|
|
4
|
+
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-CTb100Uk.cjs");
|
|
5
5
|
const require_bin = require("./bin.cjs");
|
|
6
6
|
let effect = require("effect");
|
|
7
7
|
//#region src/sourceControl/ForgejoSourceControlProvider.ts
|
package/dist/{GitHubSourceControlProvider-9lJFzjsu.cjs → GitHubSourceControlProvider-B1Tp0TbY.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-B-GW3u_2.cjs");
|
|
4
|
+
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-CTb100Uk.cjs");
|
|
5
5
|
const require_sourceControl = require("./sourceControl-x2t62T8h.cjs");
|
|
6
6
|
const require_bin = require("./bin.cjs");
|
|
7
7
|
let effect = require("effect");
|
|
@@ -157,6 +157,18 @@ function durationMsOption(startedAt, finishedAt) {
|
|
|
157
157
|
if (started === null || finished === null || !Number.isFinite(started.getTime()) || !Number.isFinite(finished.getTime())) return effect.Option.none();
|
|
158
158
|
return effect.Option.some(Math.max(0, finished.getTime() - started.getTime()));
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Pick the commit oid of the most recent run in a branch-scoped result. GitHub
|
|
162
|
+
* returns runs newest-first, but we compare start times defensively and fall
|
|
163
|
+
* back to that ordering when timestamps are absent or tied. Returns null when
|
|
164
|
+
* no usable oid is present (e.g. the placeholder "unknown").
|
|
165
|
+
*/
|
|
166
|
+
function newestWorkflowRunCommitOid(runs) {
|
|
167
|
+
let newest = null;
|
|
168
|
+
for (const run of runs) if (newest === null || (run.startedAt ?? "") > (newest.startedAt ?? "")) newest = run;
|
|
169
|
+
const oid = newest?.commit.oid.trim();
|
|
170
|
+
return oid && oid !== "unknown" ? oid : null;
|
|
171
|
+
}
|
|
160
172
|
function toWorkflowRun(raw) {
|
|
161
173
|
return {
|
|
162
174
|
provider: "github",
|
|
@@ -432,17 +444,28 @@ const make = effect.Effect.fn("makeGitHubSourceControlProvider")(function* () {
|
|
|
432
444
|
repositoryNameWithOwner = context.baseRepositoryNameWithOwner ?? context.headRepositoryNameWithOwner;
|
|
433
445
|
headSha = context.headSha;
|
|
434
446
|
}
|
|
435
|
-
const
|
|
447
|
+
const branch = headSha === null && input.pullRequestNumber === void 0 ? input.branch?.trim() || null : null;
|
|
448
|
+
const fetched = yield* github.listWorkflowRuns({
|
|
436
449
|
cwd: input.cwd,
|
|
437
450
|
...headSha ? { headSha } : {},
|
|
451
|
+
...branch ? { branch } : {},
|
|
438
452
|
...input.limit !== void 0 ? { limit: input.limit } : {}
|
|
439
453
|
});
|
|
454
|
+
let runs = fetched;
|
|
455
|
+
let resolvedHeadSha = headSha;
|
|
456
|
+
if (branch !== null && fetched.length > 0) {
|
|
457
|
+
const oid = newestWorkflowRunCommitOid(fetched);
|
|
458
|
+
if (oid !== null) {
|
|
459
|
+
resolvedHeadSha = oid;
|
|
460
|
+
runs = fetched.filter((run) => run.commit.oid === oid);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
440
463
|
repositoryNameWithOwner = repositoryNameWithOwner ?? runs.find((run) => run.repositoryNameWithOwner !== null)?.repositoryNameWithOwner ?? null;
|
|
441
464
|
return {
|
|
442
465
|
provider: "github",
|
|
443
466
|
repository: optionFromString(repositoryNameWithOwner),
|
|
444
467
|
pullRequestNumber: input.pullRequestNumber !== void 0 ? effect.Option.some(input.pullRequestNumber) : effect.Option.none(),
|
|
445
|
-
headSha: optionFromString(
|
|
468
|
+
headSha: optionFromString(resolvedHeadSha),
|
|
446
469
|
runs: runs.map(toWorkflowRun)
|
|
447
470
|
};
|
|
448
471
|
}).pipe(effect.Effect.mapError((cause) => providerError("listWorkflowRuns", cause))),
|
package/dist/{GitHubSourceControlProvider-C-LGwho3.mjs → GitHubSourceControlProvider-Kf4rrBTF.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { n as githubDiscovery, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent, Tn as SOURCE_CONTROL_WORKFLOW_LOG_MAX_BYTES } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
|
+
import { n as githubDiscovery, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-Zk11tJoL.mjs";
|
|
5
5
|
import { i as parseGitHubRepositoryOwnerFromUrl, t as classifySourceControlCommentAuthorRole } from "./sourceControl-iWG-m4wE.mjs";
|
|
6
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";
|
|
@@ -157,6 +157,18 @@ function durationMsOption(startedAt, finishedAt) {
|
|
|
157
157
|
if (started === null || finished === null || !Number.isFinite(started.getTime()) || !Number.isFinite(finished.getTime())) return Option.none();
|
|
158
158
|
return Option.some(Math.max(0, finished.getTime() - started.getTime()));
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Pick the commit oid of the most recent run in a branch-scoped result. GitHub
|
|
162
|
+
* returns runs newest-first, but we compare start times defensively and fall
|
|
163
|
+
* back to that ordering when timestamps are absent or tied. Returns null when
|
|
164
|
+
* no usable oid is present (e.g. the placeholder "unknown").
|
|
165
|
+
*/
|
|
166
|
+
function newestWorkflowRunCommitOid(runs) {
|
|
167
|
+
let newest = null;
|
|
168
|
+
for (const run of runs) if (newest === null || (run.startedAt ?? "") > (newest.startedAt ?? "")) newest = run;
|
|
169
|
+
const oid = newest?.commit.oid.trim();
|
|
170
|
+
return oid && oid !== "unknown" ? oid : null;
|
|
171
|
+
}
|
|
160
172
|
function toWorkflowRun(raw) {
|
|
161
173
|
return {
|
|
162
174
|
provider: "github",
|
|
@@ -432,17 +444,28 @@ const make = Effect.fn("makeGitHubSourceControlProvider")(function* () {
|
|
|
432
444
|
repositoryNameWithOwner = context.baseRepositoryNameWithOwner ?? context.headRepositoryNameWithOwner;
|
|
433
445
|
headSha = context.headSha;
|
|
434
446
|
}
|
|
435
|
-
const
|
|
447
|
+
const branch = headSha === null && input.pullRequestNumber === void 0 ? input.branch?.trim() || null : null;
|
|
448
|
+
const fetched = yield* github.listWorkflowRuns({
|
|
436
449
|
cwd: input.cwd,
|
|
437
450
|
...headSha ? { headSha } : {},
|
|
451
|
+
...branch ? { branch } : {},
|
|
438
452
|
...input.limit !== void 0 ? { limit: input.limit } : {}
|
|
439
453
|
});
|
|
454
|
+
let runs = fetched;
|
|
455
|
+
let resolvedHeadSha = headSha;
|
|
456
|
+
if (branch !== null && fetched.length > 0) {
|
|
457
|
+
const oid = newestWorkflowRunCommitOid(fetched);
|
|
458
|
+
if (oid !== null) {
|
|
459
|
+
resolvedHeadSha = oid;
|
|
460
|
+
runs = fetched.filter((run) => run.commit.oid === oid);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
440
463
|
repositoryNameWithOwner = repositoryNameWithOwner ?? runs.find((run) => run.repositoryNameWithOwner !== null)?.repositoryNameWithOwner ?? null;
|
|
441
464
|
return {
|
|
442
465
|
provider: "github",
|
|
443
466
|
repository: optionFromString(repositoryNameWithOwner),
|
|
444
467
|
pullRequestNumber: input.pullRequestNumber !== void 0 ? Option.some(input.pullRequestNumber) : Option.none(),
|
|
445
|
-
headSha: optionFromString(
|
|
468
|
+
headSha: optionFromString(resolvedHeadSha),
|
|
446
469
|
runs: runs.map(toWorkflowRun)
|
|
447
470
|
};
|
|
448
471
|
}).pipe(Effect.mapError((cause) => providerError("listWorkflowRuns", cause))),
|
package/dist/{GitLabSourceControlProvider-CvKA74lg.cjs → GitLabSourceControlProvider-D3vvKrB4.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-B-GW3u_2.cjs");
|
|
4
|
+
const require_SourceControlProviderDiscoveryCatalog = require("./SourceControlProviderDiscoveryCatalog-CTb100Uk.cjs");
|
|
5
5
|
const require_bin = require("./bin.cjs");
|
|
6
6
|
let effect = require("effect");
|
|
7
7
|
//#region src/sourceControl/GitLabSourceControlProvider.ts
|
package/dist/{GitLabSourceControlProvider-CkeT2aEx.mjs → GitLabSourceControlProvider-Ygppeftk.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { l as sourceControlRefFromInput, o as SourceControlProvider, r as gitlabDiscovery } from "./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
|
+
import { l as sourceControlRefFromInput, o as SourceControlProvider, r as gitlabDiscovery } from "./SourceControlProviderDiscoveryCatalog-Zk11tJoL.mjs";
|
|
5
5
|
import { Bt as GitLabCli } from "./bin.mjs";
|
|
6
6
|
import { DateTime, Effect, Layer, Option } from "effect";
|
|
7
7
|
//#region src/sourceControl/GitLabSourceControlProvider.ts
|
|
@@ -160,7 +160,10 @@ const makeMemory = (config = {}) => makeWithDatabase({
|
|
|
160
160
|
}, () => {
|
|
161
161
|
return new node_sqlite.DatabaseSync(":memory:", { allowExtension: config.allowExtension ?? false });
|
|
162
162
|
});
|
|
163
|
-
const layerConfig = (config) => effect_Layer.effectContext(
|
|
163
|
+
const layerConfig = (config) => effect_Layer.effectContext(effect_Effect.gen(function* () {
|
|
164
|
+
const client = yield* make(yield* effect_Config.unwrap(config));
|
|
165
|
+
return effect_Context.make(SqliteClient, client).pipe(effect_Context.add(effect_unstable_sql_SqlClient.SqlClient, client));
|
|
166
|
+
})).pipe(effect_Layer.provide(effect_unstable_reactivity_Reactivity.layer));
|
|
164
167
|
const layer = (config) => effect_Layer.effectContext(effect_Effect.map(make(config), (client) => effect_Context.make(SqliteClient, client).pipe(effect_Context.add(effect_unstable_sql_SqlClient.SqlClient, client)))).pipe(effect_Layer.provide(effect_unstable_reactivity_Reactivity.layer));
|
|
165
168
|
const layerMemory = (config = {}) => effect_Layer.effectContext(effect_Effect.map(makeMemory(config), (client) => effect_Context.make(SqliteClient, client).pipe(effect_Context.add(effect_unstable_sql_SqlClient.SqlClient, client)))).pipe(effect_Layer.provide(effect_unstable_reactivity_Reactivity.layer));
|
|
166
169
|
//#endregion
|
|
@@ -146,7 +146,10 @@ const makeMemory = (config = {}) => makeWithDatabase({
|
|
|
146
146
|
}, () => {
|
|
147
147
|
return new DatabaseSync(":memory:", { allowExtension: config.allowExtension ?? false });
|
|
148
148
|
});
|
|
149
|
-
const layerConfig = (config) => Layer.effectContext(
|
|
149
|
+
const layerConfig = (config) => Layer.effectContext(Effect.gen(function* () {
|
|
150
|
+
const client = yield* make(yield* Config.unwrap(config));
|
|
151
|
+
return Context.make(SqliteClient, client).pipe(Context.add(Client.SqlClient, client));
|
|
152
|
+
})).pipe(Layer.provide(Reactivity.layer));
|
|
150
153
|
const layer = (config) => Layer.effectContext(Effect.map(make(config), (client) => Context.make(SqliteClient, client).pipe(Context.add(Client.SqlClient, client)))).pipe(Layer.provide(Reactivity.layer));
|
|
151
154
|
const layerMemory = (config = {}) => Layer.effectContext(Effect.map(makeMemory(config), (client) => Context.make(SqliteClient, client).pipe(Context.add(Client.SqlClient, client)))).pipe(Layer.provide(Reactivity.layer));
|
|
152
155
|
//#endregion
|