ryco-cli 0.1.7 → 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-CF5LuCHp.mjs → AzureDevOpsSourceControlProvider-B5vb4DOU.mjs} +2 -2
- package/dist/{AzureDevOpsSourceControlProvider-5exivY-1.cjs → AzureDevOpsSourceControlProvider-CYZmJqSM.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-CKH09tfT.mjs → BitbucketSourceControlProvider-CcAb4IgH.mjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-1GWENqcl.cjs → BitbucketSourceControlProvider-D_7i4YQz.cjs} +2 -2
- package/dist/{ClaudeDriver-WwWFTu61.mjs → ClaudeDriver-CoPBpdrp.mjs} +22 -5
- package/dist/{ClaudeDriver-BXLdjrht.cjs → ClaudeDriver-ScqmbPKW.cjs} +22 -5
- package/dist/{CodexDriver-BboMT9uk.cjs → CodexDriver-CtCCc3CC.cjs} +34 -7
- package/dist/{CodexDriver-93-TmCrO.mjs → CodexDriver-DH7vqku4.mjs} +34 -7
- package/dist/{CodexTextGeneration-BU9Myn87.mjs → CodexTextGeneration-CJV1jPda.mjs} +2 -2
- package/dist/{CodexTextGeneration-0pRbJji3.cjs → CodexTextGeneration-Db2hn8Qz.cjs} +2 -2
- package/dist/{CopilotDriver-BASi8pJ0.mjs → CopilotDriver-CFCF68Te.mjs} +6 -5
- package/dist/{CopilotDriver-DCsv-17W.cjs → CopilotDriver-DLN2KEoc.cjs} +6 -5
- package/dist/{CursorDriver-BTSiM3A8.cjs → CursorDriver-BlvQbOEZ.cjs} +42 -3
- package/dist/{CursorDriver-D5LvIqUk.mjs → CursorDriver-Dej81rwD.mjs} +42 -3
- package/dist/{ForgejoSourceControlProvider-e-4hvvZ_.mjs → ForgejoSourceControlProvider-3cFD7SqY.mjs} +2 -2
- package/dist/{ForgejoSourceControlProvider-BTXRDCGB.cjs → ForgejoSourceControlProvider-DYFUGvBk.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-DWmwkA_y.cjs → GitHubSourceControlProvider-B1Tp0TbY.cjs} +27 -4
- package/dist/{GitHubSourceControlProvider-26IofDAO.mjs → GitHubSourceControlProvider-Kf4rrBTF.mjs} +27 -4
- package/dist/{GitLabSourceControlProvider-D-YHnxRe.cjs → GitLabSourceControlProvider-D3vvKrB4.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-DePct78W.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-BhvLOmvn.mjs → OpenCodeDriver-BGa9Tkot.mjs} +3 -3
- package/dist/{OpenCodeDriver-CVeZ4n9-.cjs → OpenCodeDriver-mbR9mF54.cjs} +3 -3
- package/dist/{SourceControlProviderDiscoveryCatalog-DeFR5xH3.cjs → SourceControlProviderDiscoveryCatalog-CTb100Uk.cjs} +1 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-mJV_Xitr.mjs → SourceControlProviderDiscoveryCatalog-Zk11tJoL.mjs} +1 -1
- package/dist/bin.cjs +259 -243
- package/dist/bin.mjs +259 -243
- package/dist/client/assets/{AnimatedHeight-BSU0lzYs.js → AnimatedHeight-CPQ2q38I.js} +1 -1
- package/dist/client/assets/AppearanceSettings-B0FYiIxL.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-CZIFSvhd.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-B_KEfCUE.js → CompositeRoot-Bs0hfelE.js} +1 -1
- package/dist/client/assets/ConnectionsSettings-DvZNgO60.js +1 -0
- package/dist/client/assets/{DiagnosticsSettings-DtzPCb6N.js → DiagnosticsSettings-0v_hh1Qh.js} +1 -1
- package/dist/client/assets/{DialogHandle-DuHnmWoE.js → DialogHandle-CwEAVRF_.js} +1 -1
- package/dist/client/assets/{DialogRoot-BV25qAcA.js → DialogRoot-CYuaaDI3.js} +1 -1
- package/dist/client/assets/{DialogTitle-DQsi-RTa.js → DialogTitle-Cak6zT3u.js} +1 -1
- package/dist/client/assets/{DialogTrigger-D0fA01C6.js → DialogTrigger-BD0KYYT-.js} +1 -1
- package/dist/client/assets/{DialogViewport-CMV_BePU.js → DialogViewport-9sGf4JUp.js} +1 -1
- package/dist/client/assets/{DraftChatThreadRouteView-BoiKnrii.js → DraftChatThreadRouteView-nvKLHlii.js} +1 -1
- package/dist/client/assets/{JetBrainsIcons-BcPxJlMf.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-C2q_O1kP.js → NoActiveThreadState-cxMCW-cQ.js} +1 -1
- package/dist/client/assets/OpinionatedPluginsSettings-ag_OgOGj.js +1 -0
- package/dist/client/assets/{ProjectFavicon-D2imiJ8M.js → ProjectFavicon-D97Hy4xo.js} +1 -1
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-CJgA--nK.js → ProviderUpdateLaunchNotification.logic-RMYvRSEk.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-DcdVMRVC.js +1 -0
- package/dist/client/assets/{RedactedSensitiveText-B2GFTyfq.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-Cw_jLVQf.js → ThreadStatusIndicators-CebYbeXP.js} +1 -1
- package/dist/client/assets/{ThreadTerminalDrawer-D1WnSemH.js → ThreadTerminalDrawer-DlI0gGer.js} +2 -2
- package/dist/client/assets/{ThreadWorkspacePanel-L4qCPTOA.js → ThreadWorkspacePanel-CEIVrCZ0.js} +6 -6
- package/dist/client/assets/{alert-dialog-CNmKa0BK.js → alert-dialog-wh07u3JU.js} +1 -1
- package/dist/client/assets/{chart-column-BWSKYZ_a.js → chart-column-Cg34FxwD.js} +1 -1
- package/dist/client/assets/{chatThreadActions-TtDsiwDC.js → chatThreadActions-UitETN_n.js} +1 -1
- package/dist/client/assets/{chevron-up-zopJ_99l.js → chevron-up-C3DS3evc.js} +1 -1
- package/dist/client/assets/{clamp-Ds6WJu8j.js → clamp-DPbdAzEu.js} +1 -1
- package/dist/client/assets/{clipboard-copy-BoJGpdmJ.js → clipboard-copy-ClVNnHW5.js} +1 -1
- package/dist/client/assets/clock-Cr66Pt4W.js +1 -0
- package/dist/client/assets/{commandPaletteStore-KebG835b.js → commandPaletteStore-DzUBFRor.js} +1 -1
- package/dist/client/assets/composerDraftStore-BfLPHwHL.js +21 -0
- package/dist/client/assets/{desktopUpdateAtoms-BQ0GGEfM.js → desktopUpdateAtoms-BiqPT2_z.js} +1 -1
- package/dist/client/assets/{download-CUiRE0N9.js → download-DJ1juHK4.js} +1 -1
- package/dist/client/assets/{draft-input-CwpGDtoT.js → draft-input-B1txZFC7.js} +1 -1
- package/dist/client/assets/editorPreferences-Bbmh6Bm1.js +1 -0
- package/dist/client/assets/{empty-CBuXePtg.js → empty-CUEYr1p8.js} +1 -1
- package/dist/client/assets/{group-BpZvxjG5.js → group-BouZ2n9F.js} +1 -1
- package/dist/client/assets/{index-BKzXTNJ_.js → index-DiHgOLH_.js} +2 -2
- package/dist/client/assets/{input-CgDawd6k.js → input-Do_m9U-4.js} +1 -1
- package/dist/client/assets/kbd-DJilTfYF.js +1 -0
- package/dist/client/assets/{keybindings-CUTRYI_A.js → keybindings-CRkz0yvp.js} +1 -1
- package/dist/client/assets/{keyboard-DFFiI7JY.js → keyboard-D3WgbAUQ.js} +1 -1
- package/dist/client/assets/{keyedQuery-DiOCbGH0.js → keyedQuery-PQcOnB2O.js} +0 -0
- package/dist/client/assets/{main-BgFGju3e.js → main-C-491vdD.js} +3 -3
- package/dist/client/assets/main-fW5L_SdM.css +2 -0
- package/dist/client/assets/{palette-BXCL909c.js → palette-BRoYo327.js} +1 -1
- package/dist/client/assets/{play-DI2LZohg.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-_PPYg3YY.js → radio-group-De3hRQoY.js} +1 -1
- package/dist/client/assets/{refresh-cw-BsQTNBXl.js → refresh-cw-D_1NT-T2.js} +1 -1
- package/dist/client/assets/{resolveAriaLabelledBy-CRHo_s16.js → resolveAriaLabelledBy-RblUm3b1.js} +1 -1
- package/dist/client/assets/rightPanelRouteSearch-DLllyqRr.js +1 -0
- package/dist/client/assets/{scale-DDEJ-tvn.js → scale-s57Ro96s.js} +1 -1
- package/dist/client/assets/{scroll-area-HgsI-ErG.js → scroll-area-B0_k8-iT.js} +1 -1
- package/dist/client/assets/{separator-ClnL4mUB.js → separator-AyXRgdnJ.js} +1 -1
- package/dist/client/assets/{server-Bbs3L-6_.js → server-Z-m1OqE5.js} +1 -1
- package/dist/client/assets/{session-logic-CKQkgIwo.js → session-logic-B87Htlw4.js} +2 -2
- package/dist/client/assets/settingsDialogStore-CxUfUnd9.js +1 -0
- package/dist/client/assets/{settingsLayout-G5xVm-ZT.js → settingsLayout-BtKS3Z8f.js} +1 -1
- package/dist/client/assets/{sidebar-_u7SGgmC.js → sidebar-B0WxOej2.js} +1 -1
- package/dist/client/assets/{sidebarStatusText-BTYnwflG.js → sidebarStatusText-C_EsHj20.js} +1 -1
- package/dist/client/assets/{skeleton-CmUvhZGP.js → skeleton-COt2Az5i.js} +1 -1
- package/dist/client/assets/{storeSelectors-DhJRpdiw.js → storeSelectors-BuB4Kzj6.js} +1 -1
- package/dist/client/assets/{threadSelectionStore-ygmA4DNA.js → threadSelectionStore-BS6X6HHt.js} +1 -1
- package/dist/client/assets/toast-CaV8TQi_.js +1 -0
- package/dist/client/assets/{toggle-DGS7tKuj.js → toggle-DE4ApNIU.js} +1 -1
- package/dist/client/assets/{toggle-group-Dtv1ZUFW.js → toggle-group-BuzAkAEk.js} +1 -1
- package/dist/client/assets/{tokenModePresentation-Dor1DnBx.js → tokenModePresentation-BCL2aeat.js} +1 -1
- package/dist/client/assets/{trash-2-C2G3VGoV.js → trash-2-ZZ1feCT6.js} +1 -1
- package/dist/client/assets/{triangle-alert-Bpz3xGu5.js → triangle-alert-CL3zqnKL.js} +1 -1
- package/dist/client/assets/{undo-2-C3rtxuqZ.js → undo-2-Cu9H3R3q.js} +1 -1
- package/dist/client/assets/{useHandleNewThread-ypSbzG0P.js → useHandleNewThread-Gke-ZFBr.js} +1 -1
- package/dist/client/assets/useLabelableId-DfuxWqrk.js +1 -0
- package/dist/client/assets/{useNavigate-_4hWGSey.js → useNavigate-DQEHh6ky.js} +1 -1
- package/dist/client/assets/{vscode-icons-DdSTtxYd.js → vscode-icons-DGDiHkqG.js} +1 -1
- package/dist/client/assets/{wrench-C4jdis40.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-uNXVRHOf.cjs → collectUint8StreamText-B-GW3u_2.cjs} +83 -10
- package/dist/{collectUint8StreamText-Lv4GGI79.mjs → collectUint8StreamText-COE2_gie.mjs} +83 -10
- package/dist/{makeManagedServerProvider-CkPEptun.mjs → makeManagedServerProvider-D1_iEWGi.mjs} +1 -1
- package/dist/{makeManagedServerProvider-3SD-Q5xh.cjs → makeManagedServerProvider-DTsQ87HL.cjs} +1 -1
- package/package.json +4 -2
- package/dist/client/assets/AppearanceSettings-D7q0ujGK.js +0 -1
- package/dist/client/assets/ChatRightPanel-CWHOIuiQ.js +0 -188
- package/dist/client/assets/ChatThreadRouteView-bA7xWXzc.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-DNYaVOZO.js +0 -1
- package/dist/client/assets/ConnectionsSettings-CLZPbx_K.js +0 -1
- package/dist/client/assets/KeybindingsSettings-LuI98pdF.js +0 -7
- package/dist/client/assets/McpServersSettings-BFMuWYVV.js +0 -6
- package/dist/client/assets/OpinionatedPluginsSettings-Bqwct37O.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-B97vbeu6.js +0 -1
- package/dist/client/assets/RootAppShell-C1xTR98P.js +0 -12
- package/dist/client/assets/SettingsDialog-Q0Q8O5oH.js +0 -2
- package/dist/client/assets/SourceControlSettings-KAvoPTNi.js +0 -1
- package/dist/client/assets/StatisticsPanel-BzsQ444K.js +0 -64
- package/dist/client/assets/clock-CzUHThzk.js +0 -1
- package/dist/client/assets/composerDraftStore-DpPEQ6BN.js +0 -21
- package/dist/client/assets/editorPreferences-jN7DKbyt.js +0 -1
- package/dist/client/assets/kbd-QYSL97CK.js +0 -1
- package/dist/client/assets/main-D0UFdwts.css +0 -2
- package/dist/client/assets/plus-DzgIfHUF.js +0 -1
- package/dist/client/assets/projectAtoms-DXXpuERK.js +0 -1
- package/dist/client/assets/providerDriverMeta-CRNNp0q3.js +0 -1
- package/dist/client/assets/providerIconUtils-D-DFhem2.js +0 -47
- package/dist/client/assets/rightPanelRouteSearch-CfmZ7osj.js +0 -1
- package/dist/client/assets/settingsDialogStore-SG-W1q0A.js +0 -1
- package/dist/client/assets/toast-DmA_ziPT.js +0 -1
- package/dist/client/assets/useLabelableId-Bc7KEnHU.js +0 -1
- package/dist/client/assets/x-CG2WU63t.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-
|
|
4
|
-
import { l as sourceControlRefFromInput, o as SourceControlProvider, t as azureDevOpsDiscovery } from "./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
|
+
import { l as sourceControlRefFromInput, o as SourceControlProvider, t as azureDevOpsDiscovery } from "./SourceControlProviderDiscoveryCatalog-Zk11tJoL.mjs";
|
|
5
5
|
import { Yt as AzureDevOpsCli } from "./bin.mjs";
|
|
6
6
|
import { DateTime, Effect, Layer, Option } from "effect";
|
|
7
7
|
//#region src/sourceControl/AzureDevOpsSourceControlProvider.ts
|
|
@@ -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/AzureDevOpsSourceControlProvider.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-
|
|
4
|
-
import { i as makeBitbucketDiscovery, l as sourceControlRefFromInput, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
|
+
import { i as makeBitbucketDiscovery, l as sourceControlRefFromInput, o as SourceControlProvider } from "./SourceControlProviderDiscoveryCatalog-Zk11tJoL.mjs";
|
|
5
5
|
import { Jt as BitbucketApi } from "./bin.mjs";
|
|
6
6
|
import { DateTime, Effect, Layer, Option } from "effect";
|
|
7
7
|
//#region src/sourceControl/BitbucketSourceControlProvider.ts
|
|
@@ -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/BitbucketSourceControlProvider.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { Bn as ProviderInstanceId, I as ClaudeSettings, Sr as TurnId, _r as RuntimeRequestId, br as ThreadId, gr as RuntimeItemId, hr as ProviderItemId, lr as EventId, nr as ApprovalRequestId, vr as RuntimeSubagentId, x as TextGenerationError, yr as RuntimeTaskId, zn as ProviderDriverKind } from "./collectUint8StreamText-
|
|
3
|
+
import { Bn as ProviderInstanceId, I as ClaudeSettings, Sr as TurnId, _r as RuntimeRequestId, br as ThreadId, gr as RuntimeItemId, hr as ProviderItemId, lr as EventId, nr as ApprovalRequestId, vr as RuntimeSubagentId, x as TextGenerationError, yr as RuntimeTaskId, 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
5
|
import { C as DEFAULT_TIMEOUT_MS, E as buildServerProvider, F as ProviderAdapterRequestError, I as ProviderAdapterSessionClosedError, L as ProviderAdapterSessionNotFoundError, M as providerModelsFromSettings, N as spawnAndCollect, O as detailFromResult, P as ProviderAdapterProcessError, Qt as makePackageManagedProviderMaintenanceResolver, R as ProviderAdapterValidationError, T as buildSelectOptionDescriptor, U as expandHomePath, Xt as enrichProviderSnapshotWithVersionAdvisory, _ as buildTokenReductionInstructions, an as resolveAttachmentPath, cn as createModelCapabilities, fn as getProviderOptionCurrentValue, g as makeEventNdjsonLogger, gn as resolvePromptInjectedEffort, h as ProviderEventLoggers, in as ServerSettingsService, j as parseGenericCliVersion, k as isCommandMissingCause, ln as getModelSelectionBooleanOptionValue, nn as resolveProviderMaintenanceCapabilitiesEffect, pn as getProviderOptionDescriptors, rn as compareCliVersions, sn as applyClaudePromptEffortPrefix, t as makeServerQueueMetrics, tn as normalizeCommandPath, un as getModelSelectionStringOptionValue, v as checkRtkAvailability, w as buildBooleanOptionDescriptor, y as mergeProviderInstanceEnvironment, z as ProviderDriverError } from "./bin.mjs";
|
|
6
|
-
import { a as buildIssueContentTitlePrompt, d as sanitizePrTitle, f as sanitizeThreadTitle, i as buildIssueContentPolishPrompt, l as normalizeCliError, n as buildBranchNamePrompt, o as buildPrContentPrompt, p as toJsonSchemaObject, r as buildCommitMessagePrompt, s as buildThreadTitlePrompt, t as makeManagedServerProvider, u as sanitizeCommitSubject } from "./makeManagedServerProvider-
|
|
6
|
+
import { a as buildIssueContentTitlePrompt, d as sanitizePrTitle, f as sanitizeThreadTitle, i as buildIssueContentPolishPrompt, l as normalizeCliError, n as buildBranchNamePrompt, o as buildPrContentPrompt, p as toJsonSchemaObject, r as buildCommitMessagePrompt, s as buildThreadTitlePrompt, t as makeManagedServerProvider, u as sanitizeCommitSubject } from "./makeManagedServerProvider-D1_iEWGi.mjs";
|
|
7
7
|
import { t as formatSourceControlContextsForAgent } from "./sourceControlContextFormatter-DEwpnVAH.mjs";
|
|
8
8
|
import { n as formatProjectCustomSystemPrompt } from "./ProjectCustomSystemPrompt-CS1nulhL.mjs";
|
|
9
9
|
import { t as defaultProviderContinuationIdentity } from "./ProviderDriver-kCV60GKk.mjs";
|
|
@@ -42,7 +42,8 @@ const DEFAULT_CLAUDE_MODEL_CAPABILITIES = createModelCapabilities({ optionDescri
|
|
|
42
42
|
const PROVIDER$1 = ProviderDriverKind.make("claudeAgent");
|
|
43
43
|
const CLAUDE_PRESENTATION = {
|
|
44
44
|
displayName: "Claude",
|
|
45
|
-
showInteractionModeToggle: true
|
|
45
|
+
showInteractionModeToggle: true,
|
|
46
|
+
supportsAskMode: true
|
|
46
47
|
};
|
|
47
48
|
const MINIMUM_CLAUDE_OPUS_4_8_VERSION = "2.1.154";
|
|
48
49
|
const MINIMUM_CLAUDE_OPUS_4_7_VERSION = "2.1.111";
|
|
@@ -178,6 +179,18 @@ const BUILT_IN_MODELS = [
|
|
|
178
179
|
supportsContextWindow: false
|
|
179
180
|
})
|
|
180
181
|
},
|
|
182
|
+
{
|
|
183
|
+
slug: "claude-sonnet-5",
|
|
184
|
+
name: "Claude Sonnet 5",
|
|
185
|
+
shortName: "Sonnet 5",
|
|
186
|
+
isCustom: false,
|
|
187
|
+
capabilities: buildClaudeOpusCapabilities({
|
|
188
|
+
effortLevels: CLAUDE_OPUS_ADAPTIVE_EFFORT_LEVELS,
|
|
189
|
+
defaultEffort: "high",
|
|
190
|
+
supportsFastMode: false,
|
|
191
|
+
supportsContextWindow: true
|
|
192
|
+
})
|
|
193
|
+
},
|
|
181
194
|
{
|
|
182
195
|
slug: "claude-sonnet-4-6",
|
|
183
196
|
name: "Claude Sonnet 4.6",
|
|
@@ -916,7 +929,10 @@ function maxClaudeContextWindowFromModelUsage(modelUsage) {
|
|
|
916
929
|
function normalizeClaudeTokenUsage(value, contextWindow) {
|
|
917
930
|
if (!value || typeof value !== "object") return;
|
|
918
931
|
const usage = value;
|
|
919
|
-
const
|
|
932
|
+
const directInputTokens = typeof usage.input_tokens === "number" && Number.isFinite(usage.input_tokens) ? usage.input_tokens : 0;
|
|
933
|
+
const cacheCreationInputTokens = typeof usage.cache_creation_input_tokens === "number" && Number.isFinite(usage.cache_creation_input_tokens) ? usage.cache_creation_input_tokens : 0;
|
|
934
|
+
const cachedInputTokens = typeof usage.cache_read_input_tokens === "number" && Number.isFinite(usage.cache_read_input_tokens) ? usage.cache_read_input_tokens : 0;
|
|
935
|
+
const inputTokens = directInputTokens + cacheCreationInputTokens + cachedInputTokens;
|
|
920
936
|
const outputTokens = typeof usage.output_tokens === "number" && Number.isFinite(usage.output_tokens) ? usage.output_tokens : 0;
|
|
921
937
|
const derivedTotalProcessedTokens = inputTokens + outputTokens;
|
|
922
938
|
const totalProcessedTokens = (typeof usage.total_tokens === "number" && Number.isFinite(usage.total_tokens) ? usage.total_tokens : void 0) ?? (derivedTotalProcessedTokens > 0 ? derivedTotalProcessedTokens : void 0);
|
|
@@ -928,6 +944,7 @@ function normalizeClaudeTokenUsage(value, contextWindow) {
|
|
|
928
944
|
lastUsedTokens: usedTokens,
|
|
929
945
|
...totalProcessedTokens > usedTokens ? { totalProcessedTokens } : {},
|
|
930
946
|
...inputTokens > 0 ? { inputTokens } : {},
|
|
947
|
+
...cachedInputTokens > 0 ? { cachedInputTokens } : {},
|
|
931
948
|
...outputTokens > 0 ? { outputTokens } : {},
|
|
932
949
|
...maxTokens !== void 0 ? { maxTokens } : {},
|
|
933
950
|
...typeof usage.tool_uses === "number" && Number.isFinite(usage.tool_uses) ? { toolUses: usage.tool_uses } : {},
|
|
@@ -2874,7 +2891,7 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (claudeSettin
|
|
|
2874
2891
|
model: modelSelection.model
|
|
2875
2892
|
};
|
|
2876
2893
|
}
|
|
2877
|
-
if (input.interactionMode === "plan") yield* Effect.tryPromise({
|
|
2894
|
+
if (input.interactionMode === "plan" || input.interactionMode === "ask") yield* Effect.tryPromise({
|
|
2878
2895
|
try: () => context.query.setPermissionMode("plan"),
|
|
2879
2896
|
catch: (cause) => toRequestError(input.threadId, "turn/setPermissionMode", cause)
|
|
2880
2897
|
});
|
|
@@ -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-
|
|
4
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-B-GW3u_2.cjs");
|
|
5
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-DTsQ87HL.cjs");
|
|
8
8
|
const require_sourceControlContextFormatter = require("./sourceControlContextFormatter-BDZqn-4T.cjs");
|
|
9
9
|
const require_ProjectCustomSystemPrompt = require("./ProjectCustomSystemPrompt-B8SUlNGa.cjs");
|
|
10
10
|
const require_ProviderDriver = require("./ProviderDriver--rNeAi3B.cjs");
|
|
@@ -46,7 +46,8 @@ const DEFAULT_CLAUDE_MODEL_CAPABILITIES = require_bin.createModelCapabilities({
|
|
|
46
46
|
const PROVIDER$1 = require_collectUint8StreamText.ProviderDriverKind.make("claudeAgent");
|
|
47
47
|
const CLAUDE_PRESENTATION = {
|
|
48
48
|
displayName: "Claude",
|
|
49
|
-
showInteractionModeToggle: true
|
|
49
|
+
showInteractionModeToggle: true,
|
|
50
|
+
supportsAskMode: true
|
|
50
51
|
};
|
|
51
52
|
const MINIMUM_CLAUDE_OPUS_4_8_VERSION = "2.1.154";
|
|
52
53
|
const MINIMUM_CLAUDE_OPUS_4_7_VERSION = "2.1.111";
|
|
@@ -182,6 +183,18 @@ const BUILT_IN_MODELS = [
|
|
|
182
183
|
supportsContextWindow: false
|
|
183
184
|
})
|
|
184
185
|
},
|
|
186
|
+
{
|
|
187
|
+
slug: "claude-sonnet-5",
|
|
188
|
+
name: "Claude Sonnet 5",
|
|
189
|
+
shortName: "Sonnet 5",
|
|
190
|
+
isCustom: false,
|
|
191
|
+
capabilities: buildClaudeOpusCapabilities({
|
|
192
|
+
effortLevels: CLAUDE_OPUS_ADAPTIVE_EFFORT_LEVELS,
|
|
193
|
+
defaultEffort: "high",
|
|
194
|
+
supportsFastMode: false,
|
|
195
|
+
supportsContextWindow: true
|
|
196
|
+
})
|
|
197
|
+
},
|
|
185
198
|
{
|
|
186
199
|
slug: "claude-sonnet-4-6",
|
|
187
200
|
name: "Claude Sonnet 4.6",
|
|
@@ -920,7 +933,10 @@ function maxClaudeContextWindowFromModelUsage(modelUsage) {
|
|
|
920
933
|
function normalizeClaudeTokenUsage(value, contextWindow) {
|
|
921
934
|
if (!value || typeof value !== "object") return;
|
|
922
935
|
const usage = value;
|
|
923
|
-
const
|
|
936
|
+
const directInputTokens = typeof usage.input_tokens === "number" && Number.isFinite(usage.input_tokens) ? usage.input_tokens : 0;
|
|
937
|
+
const cacheCreationInputTokens = typeof usage.cache_creation_input_tokens === "number" && Number.isFinite(usage.cache_creation_input_tokens) ? usage.cache_creation_input_tokens : 0;
|
|
938
|
+
const cachedInputTokens = typeof usage.cache_read_input_tokens === "number" && Number.isFinite(usage.cache_read_input_tokens) ? usage.cache_read_input_tokens : 0;
|
|
939
|
+
const inputTokens = directInputTokens + cacheCreationInputTokens + cachedInputTokens;
|
|
924
940
|
const outputTokens = typeof usage.output_tokens === "number" && Number.isFinite(usage.output_tokens) ? usage.output_tokens : 0;
|
|
925
941
|
const derivedTotalProcessedTokens = inputTokens + outputTokens;
|
|
926
942
|
const totalProcessedTokens = (typeof usage.total_tokens === "number" && Number.isFinite(usage.total_tokens) ? usage.total_tokens : void 0) ?? (derivedTotalProcessedTokens > 0 ? derivedTotalProcessedTokens : void 0);
|
|
@@ -932,6 +948,7 @@ function normalizeClaudeTokenUsage(value, contextWindow) {
|
|
|
932
948
|
lastUsedTokens: usedTokens,
|
|
933
949
|
...totalProcessedTokens > usedTokens ? { totalProcessedTokens } : {},
|
|
934
950
|
...inputTokens > 0 ? { inputTokens } : {},
|
|
951
|
+
...cachedInputTokens > 0 ? { cachedInputTokens } : {},
|
|
935
952
|
...outputTokens > 0 ? { outputTokens } : {},
|
|
936
953
|
...maxTokens !== void 0 ? { maxTokens } : {},
|
|
937
954
|
...typeof usage.tool_uses === "number" && Number.isFinite(usage.tool_uses) ? { toolUses: usage.tool_uses } : {},
|
|
@@ -2878,7 +2895,7 @@ const makeClaudeAdapter = effect.Effect.fn("makeClaudeAdapter")(function* (claud
|
|
|
2878
2895
|
model: modelSelection.model
|
|
2879
2896
|
};
|
|
2880
2897
|
}
|
|
2881
|
-
if (input.interactionMode === "plan") yield* effect.Effect.tryPromise({
|
|
2898
|
+
if (input.interactionMode === "plan" || input.interactionMode === "ask") yield* effect.Effect.tryPromise({
|
|
2882
2899
|
try: () => context.query.setPermissionMode("plan"),
|
|
2883
2900
|
catch: (cause) => toRequestError(input.threadId, "turn/setPermissionMode", cause)
|
|
2884
2901
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const require_chunk = require("./chunk-jM1PLTSZ.cjs");
|
|
4
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
4
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-B-GW3u_2.cjs");
|
|
5
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-DTsQ87HL.cjs");
|
|
8
8
|
const require_sourceControlContextFormatter = require("./sourceControlContextFormatter-BDZqn-4T.cjs");
|
|
9
9
|
const require_ProjectCustomSystemPrompt = require("./ProjectCustomSystemPrompt-B8SUlNGa.cjs");
|
|
10
|
-
const require_CodexTextGeneration = require("./CodexTextGeneration-
|
|
10
|
+
const require_CodexTextGeneration = require("./CodexTextGeneration-Db2hn8Qz.cjs");
|
|
11
11
|
let effect = require("effect");
|
|
12
12
|
let effect_unstable_http = require("effect/unstable/http");
|
|
13
13
|
let effect_unstable_process = require("effect/unstable/process");
|
|
@@ -135,11 +135,37 @@ Do not ask "should I proceed?" in the final output. The user can easily switch o
|
|
|
135
135
|
|
|
136
136
|
Only produce at most one \`<proposed_plan>\` block per turn, and only when you are presenting a complete spec.
|
|
137
137
|
</collaboration_mode>`;
|
|
138
|
+
const CODEX_ASK_MODE_DEVELOPER_INSTRUCTIONS = `<collaboration_mode># Collaboration Mode: Ask (Read-Only)
|
|
139
|
+
|
|
140
|
+
You are now in Ask mode. Any previous instructions for other modes (e.g. Plan mode) are no longer active.
|
|
141
|
+
|
|
142
|
+
Your active mode changes only when new developer instructions with a different \`<collaboration_mode>...</collaboration_mode>\` change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default, Plan, and Ask.
|
|
143
|
+
|
|
144
|
+
## Mode rules (strict)
|
|
145
|
+
|
|
146
|
+
Ask mode is a read-only question-answering mode. Answer the user's questions by exploring and inspecting the environment; do not carry out changes.
|
|
147
|
+
|
|
148
|
+
You are in Ask mode until a developer message explicitly ends it. Ask mode is not changed by user intent, tone, or imperative language. If a user asks for execution while still in Ask mode, explain what you would do and note that they can switch out of Ask mode to have it done.
|
|
149
|
+
|
|
150
|
+
### Allowed (non-mutating)
|
|
151
|
+
|
|
152
|
+
* Reading or searching files, configs, schemas, types, manifests, and docs
|
|
153
|
+
* Static analysis, inspection, and repo exploration
|
|
154
|
+
* Non-mutating commands that gather information without changing repo-tracked state
|
|
155
|
+
|
|
156
|
+
### Not allowed (mutating)
|
|
157
|
+
|
|
158
|
+
* Editing or writing files
|
|
159
|
+
* Running formatters, linters, patches, migrations, or codegen that rewrite files
|
|
160
|
+
* Side-effectful commands that change repo-tracked or system state
|
|
161
|
+
|
|
162
|
+
Your sandbox is read-only in this mode; mutating actions will fail. Do not attempt to work around the sandbox.
|
|
163
|
+
</collaboration_mode>`;
|
|
138
164
|
const CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS = `<collaboration_mode># Collaboration Mode: Default
|
|
139
165
|
|
|
140
166
|
You are now in Default mode. Any previous instructions for other modes (e.g. Plan mode) are no longer active.
|
|
141
167
|
|
|
142
|
-
Your active mode changes only when new developer instructions with a different \`<collaboration_mode>...</collaboration_mode>\` change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default and
|
|
168
|
+
Your active mode changes only when new developer instructions with a different \`<collaboration_mode>...</collaboration_mode>\` change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default, Plan, and Ask.
|
|
143
169
|
|
|
144
170
|
## request_user_input availability
|
|
145
171
|
|
|
@@ -235,9 +261,9 @@ function runtimeModeToTurnSandboxPolicy(input) {
|
|
|
235
261
|
function buildCodexCollaborationMode(input) {
|
|
236
262
|
if (input.interactionMode === void 0) return;
|
|
237
263
|
const model = normalizeCodexModelSlug(input.model) ?? "gpt-5.4";
|
|
238
|
-
const developerInstructions = require_ProjectCustomSystemPrompt.appendProjectCustomSystemPrompt(require_ProjectCustomSystemPrompt.appendProjectCustomSystemPrompt(input.interactionMode === "plan" ? CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS : CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, input.tokenReductionInstructions), input.customSystemPrompt);
|
|
264
|
+
const developerInstructions = require_ProjectCustomSystemPrompt.appendProjectCustomSystemPrompt(require_ProjectCustomSystemPrompt.appendProjectCustomSystemPrompt(input.interactionMode === "plan" ? CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS : input.interactionMode === "ask" ? CODEX_ASK_MODE_DEVELOPER_INSTRUCTIONS : CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, input.tokenReductionInstructions), input.customSystemPrompt);
|
|
239
265
|
return {
|
|
240
|
-
mode: input.interactionMode,
|
|
266
|
+
mode: input.interactionMode === "plan" ? "plan" : "default",
|
|
241
267
|
settings: {
|
|
242
268
|
model,
|
|
243
269
|
reasoning_effort: input.effort ?? "medium",
|
|
@@ -260,11 +286,12 @@ function buildTurnStartParams(input) {
|
|
|
260
286
|
...input.customSystemPrompt ? { customSystemPrompt: input.customSystemPrompt } : {},
|
|
261
287
|
...input.tokenReductionInstructions ? { tokenReductionInstructions: input.tokenReductionInstructions } : {}
|
|
262
288
|
});
|
|
289
|
+
const sandboxPolicy = input.interactionMode === "ask" ? { type: "readOnly" } : runtimeModeToTurnSandboxPolicy(input.runtimeMode);
|
|
263
290
|
return effect.Schema.decodeUnknownEffect(CodexTurnStartParamsWithCollaborationMode)({
|
|
264
291
|
threadId: input.threadId,
|
|
265
292
|
input: turnInput,
|
|
266
293
|
approvalPolicy: config.approvalPolicy,
|
|
267
|
-
sandboxPolicy
|
|
294
|
+
sandboxPolicy,
|
|
268
295
|
...input.model ? { model: input.model } : {},
|
|
269
296
|
...input.serviceTier ? { serviceTier: input.serviceTier } : {},
|
|
270
297
|
...input.effort ? { effort: input.effort } : {},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { Bn as ProviderInstanceId, Gt as ProviderApprovalDecision, It as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, L as CodexSettings, Sr as TurnId, _r as RuntimeRequestId, gr as RuntimeItemId, hr as ProviderItemId, lr as EventId, nr as ApprovalRequestId, zn as ProviderDriverKind } from "./collectUint8StreamText-
|
|
3
|
+
import { Bn as ProviderInstanceId, Gt as ProviderApprovalDecision, It as PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, L as CodexSettings, Sr as TurnId, _r as RuntimeRequestId, gr as RuntimeItemId, hr as ProviderItemId, lr as EventId, nr as ApprovalRequestId, zn as ProviderDriverKind } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
4
|
import { Y as ServerConfig } from "./Metrics-6Xj17Se3.mjs";
|
|
5
5
|
import { $ as ServerRequest__CommandExecutionRequestApprovalParams, At as V2ThreadStatusChangedNotification, B as codexContinuationIdentity, Ct as V2ThreadNameUpdatedNotification, Dt as V2ThreadRealtimeOutputAudioDeltaNotification, Et as V2ThreadRealtimeItemAddedNotification, F as ProviderAdapterRequestError, Ft as V2TurnStartParams, G as layerChildProcess, H as resolveCodexHomeLayout, I as ProviderAdapterSessionClosedError, It as V2TurnStartParams__CollaborationMode, J as CodexAppServerRequestError, K as CodexAppServerProcessExitedError, L as ProviderAdapterSessionNotFoundError, Lt as V2TurnStartResponse, Mt as V2TurnCompletedNotification, Nt as V2TurnDiffUpdatedNotification, Ot as V2ThreadRealtimeStartedNotification, P as ProviderAdapterProcessError, Pt as V2TurnPlanUpdatedNotification, Q as ServerRequest__ApplyPatchApprovalParams, Qt as makePackageManagedProviderMaintenanceResolver, R as ProviderAdapterValidationError, Rt as V2WindowsSandboxSetupCompletedNotification, S as makePendingCodexProvider, St as V2ServerRequestResolvedNotification, Tt as V2ThreadRealtimeErrorNotification, U as expandHomePath, V as materializeCodexShadowHome, W as CodexAppServerClient, X as CodexAppServerTransportError, Xt as enrichProviderSnapshotWithVersionAdvisory, Y as CodexAppServerSpawnError, Z as SERVER_NOTIFICATION_METHODS, _ as buildTokenReductionInstructions, _t as V2McpToolCallProgressNotification, an as resolveAttachmentPath, at as ToolRequestUserInputResponse, b as buildCodexInitializeParams, bt as V2ReasoningSummaryTextDeltaNotification, ct as V2AgentMessageDeltaNotification, dt as V2DeprecationNoticeNotification, et as ServerRequest__DynamicToolCallParams, ft as V2ErrorNotification, g as makeEventNdjsonLogger, gt as V2McpServerOauthLoginCompletedNotification, h as ProviderEventLoggers, hn as normalizeModelSlug, ht as V2ItemStartedNotification, in as ServerSettingsService, it as ToolRequestUserInputParams, jt as V2ThreadTokenUsageUpdatedNotification, kt as V2ThreadStartedNotification, ln as getModelSelectionBooleanOptionValue, lt as V2CommandExecutionOutputDeltaNotification, mt as V2ItemCompletedNotification, nn as resolveProviderMaintenanceCapabilitiesEffect, nt as ServerRequest__FileChangeRequestApprovalParams, ot as V2AccountRateLimitsUpdatedNotification, pt as V2FileChangeOutputDeltaNotification, q as CodexAppServerProtocolParseError, rt as ServerRequest__ToolRequestUserInputParams, st as V2AccountUpdatedNotification, t as makeServerQueueMetrics, tt as ServerRequest__ExecCommandApprovalParams, un as getModelSelectionStringOptionValue, ut as V2ConfigWarningNotification, v as checkRtkAvailability, vt as V2ModelReroutedNotification, wt as V2ThreadRealtimeClosedNotification, x as checkCodexProviderStatus, xt as V2ReasoningTextDeltaNotification, y as mergeProviderInstanceEnvironment, yt as V2PlanDeltaNotification, z as ProviderDriverError, zt as V2WindowsWorldWritableWarningNotification } from "./bin.mjs";
|
|
6
|
-
import { t as makeManagedServerProvider } from "./makeManagedServerProvider-
|
|
6
|
+
import { t as makeManagedServerProvider } from "./makeManagedServerProvider-D1_iEWGi.mjs";
|
|
7
7
|
import { t as formatSourceControlContextsForAgent } from "./sourceControlContextFormatter-DEwpnVAH.mjs";
|
|
8
8
|
import { t as appendProjectCustomSystemPrompt } from "./ProjectCustomSystemPrompt-CS1nulhL.mjs";
|
|
9
|
-
import { t as makeCodexTextGeneration } from "./CodexTextGeneration-
|
|
9
|
+
import { t as makeCodexTextGeneration } from "./CodexTextGeneration-CJV1jPda.mjs";
|
|
10
10
|
import { Deferred, Effect, Exit, Fiber, FileSystem, Layer, Queue, Random, Ref, Schema, Scope, Stream } from "effect";
|
|
11
11
|
import { HttpClient } from "effect/unstable/http";
|
|
12
12
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
|
@@ -133,11 +133,37 @@ Do not ask "should I proceed?" in the final output. The user can easily switch o
|
|
|
133
133
|
|
|
134
134
|
Only produce at most one \`<proposed_plan>\` block per turn, and only when you are presenting a complete spec.
|
|
135
135
|
</collaboration_mode>`;
|
|
136
|
+
const CODEX_ASK_MODE_DEVELOPER_INSTRUCTIONS = `<collaboration_mode># Collaboration Mode: Ask (Read-Only)
|
|
137
|
+
|
|
138
|
+
You are now in Ask mode. Any previous instructions for other modes (e.g. Plan mode) are no longer active.
|
|
139
|
+
|
|
140
|
+
Your active mode changes only when new developer instructions with a different \`<collaboration_mode>...</collaboration_mode>\` change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default, Plan, and Ask.
|
|
141
|
+
|
|
142
|
+
## Mode rules (strict)
|
|
143
|
+
|
|
144
|
+
Ask mode is a read-only question-answering mode. Answer the user's questions by exploring and inspecting the environment; do not carry out changes.
|
|
145
|
+
|
|
146
|
+
You are in Ask mode until a developer message explicitly ends it. Ask mode is not changed by user intent, tone, or imperative language. If a user asks for execution while still in Ask mode, explain what you would do and note that they can switch out of Ask mode to have it done.
|
|
147
|
+
|
|
148
|
+
### Allowed (non-mutating)
|
|
149
|
+
|
|
150
|
+
* Reading or searching files, configs, schemas, types, manifests, and docs
|
|
151
|
+
* Static analysis, inspection, and repo exploration
|
|
152
|
+
* Non-mutating commands that gather information without changing repo-tracked state
|
|
153
|
+
|
|
154
|
+
### Not allowed (mutating)
|
|
155
|
+
|
|
156
|
+
* Editing or writing files
|
|
157
|
+
* Running formatters, linters, patches, migrations, or codegen that rewrite files
|
|
158
|
+
* Side-effectful commands that change repo-tracked or system state
|
|
159
|
+
|
|
160
|
+
Your sandbox is read-only in this mode; mutating actions will fail. Do not attempt to work around the sandbox.
|
|
161
|
+
</collaboration_mode>`;
|
|
136
162
|
const CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS = `<collaboration_mode># Collaboration Mode: Default
|
|
137
163
|
|
|
138
164
|
You are now in Default mode. Any previous instructions for other modes (e.g. Plan mode) are no longer active.
|
|
139
165
|
|
|
140
|
-
Your active mode changes only when new developer instructions with a different \`<collaboration_mode>...</collaboration_mode>\` change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default and
|
|
166
|
+
Your active mode changes only when new developer instructions with a different \`<collaboration_mode>...</collaboration_mode>\` change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default, Plan, and Ask.
|
|
141
167
|
|
|
142
168
|
## request_user_input availability
|
|
143
169
|
|
|
@@ -233,9 +259,9 @@ function runtimeModeToTurnSandboxPolicy(input) {
|
|
|
233
259
|
function buildCodexCollaborationMode(input) {
|
|
234
260
|
if (input.interactionMode === void 0) return;
|
|
235
261
|
const model = normalizeCodexModelSlug(input.model) ?? "gpt-5.4";
|
|
236
|
-
const developerInstructions = appendProjectCustomSystemPrompt(appendProjectCustomSystemPrompt(input.interactionMode === "plan" ? CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS : CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, input.tokenReductionInstructions), input.customSystemPrompt);
|
|
262
|
+
const developerInstructions = appendProjectCustomSystemPrompt(appendProjectCustomSystemPrompt(input.interactionMode === "plan" ? CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS : input.interactionMode === "ask" ? CODEX_ASK_MODE_DEVELOPER_INSTRUCTIONS : CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, input.tokenReductionInstructions), input.customSystemPrompt);
|
|
237
263
|
return {
|
|
238
|
-
mode: input.interactionMode,
|
|
264
|
+
mode: input.interactionMode === "plan" ? "plan" : "default",
|
|
239
265
|
settings: {
|
|
240
266
|
model,
|
|
241
267
|
reasoning_effort: input.effort ?? "medium",
|
|
@@ -258,11 +284,12 @@ function buildTurnStartParams(input) {
|
|
|
258
284
|
...input.customSystemPrompt ? { customSystemPrompt: input.customSystemPrompt } : {},
|
|
259
285
|
...input.tokenReductionInstructions ? { tokenReductionInstructions: input.tokenReductionInstructions } : {}
|
|
260
286
|
});
|
|
287
|
+
const sandboxPolicy = input.interactionMode === "ask" ? { type: "readOnly" } : runtimeModeToTurnSandboxPolicy(input.runtimeMode);
|
|
261
288
|
return Schema.decodeUnknownEffect(CodexTurnStartParamsWithCollaborationMode)({
|
|
262
289
|
threadId: input.threadId,
|
|
263
290
|
input: turnInput,
|
|
264
291
|
approvalPolicy: config.approvalPolicy,
|
|
265
|
-
sandboxPolicy
|
|
292
|
+
sandboxPolicy,
|
|
266
293
|
...input.model ? { model: input.model } : {},
|
|
267
294
|
...input.serviceTier ? { serviceTier: input.serviceTier } : {},
|
|
268
295
|
...input.effort ? { effort: input.effort } : {},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { x as TextGenerationError } from "./collectUint8StreamText-
|
|
3
|
+
import { x as TextGenerationError } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
4
|
import { U as sanitizeBranchFragment, W as sanitizeFeatureBranchName, Y as ServerConfig } from "./Metrics-6Xj17Se3.mjs";
|
|
5
5
|
import { U as expandHomePath, an as resolveAttachmentPath, ln as getModelSelectionBooleanOptionValue, un as getModelSelectionStringOptionValue } from "./bin.mjs";
|
|
6
|
-
import { a as buildIssueContentTitlePrompt, d as sanitizePrTitle, f as sanitizeThreadTitle, i as buildIssueContentPolishPrompt, l as normalizeCliError, n as buildBranchNamePrompt, o as buildPrContentPrompt, p as toJsonSchemaObject, r as buildCommitMessagePrompt, s as buildThreadTitlePrompt, u as sanitizeCommitSubject } from "./makeManagedServerProvider-
|
|
6
|
+
import { a as buildIssueContentTitlePrompt, d as sanitizePrTitle, f as sanitizeThreadTitle, i as buildIssueContentPolishPrompt, l as normalizeCliError, n as buildBranchNamePrompt, o as buildPrContentPrompt, p as toJsonSchemaObject, r as buildCommitMessagePrompt, s as buildThreadTitlePrompt, u as sanitizeCommitSubject } from "./makeManagedServerProvider-D1_iEWGi.mjs";
|
|
7
7
|
import { Effect, FileSystem, Option, Path, Random, Schema, Stream } from "effect";
|
|
8
8
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
|
9
9
|
//#region src/textGeneration/CodexTextGeneration.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
3
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-B-GW3u_2.cjs");
|
|
4
4
|
const require_Metrics = require("./Metrics-CIW1QH7M.cjs");
|
|
5
5
|
const require_bin = require("./bin.cjs");
|
|
6
|
-
const require_makeManagedServerProvider = require("./makeManagedServerProvider-
|
|
6
|
+
const require_makeManagedServerProvider = require("./makeManagedServerProvider-DTsQ87HL.cjs");
|
|
7
7
|
let effect = require("effect");
|
|
8
8
|
let effect_unstable_process = require("effect/unstable/process");
|
|
9
9
|
//#region src/textGeneration/CodexTextGeneration.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { Bn as ProviderInstanceId, In as DEFAULT_GIT_TEXT_GENERATION_MODEL_BY_PROVIDER, L as CodexSettings, R as CopilotSettings, Sr as TurnId, _r as RuntimeRequestId, gr as RuntimeItemId, hr as ProviderItemId, lr as EventId, x as TextGenerationError, zn as ProviderDriverKind } from "./collectUint8StreamText-
|
|
3
|
+
import { Bn as ProviderInstanceId, In as DEFAULT_GIT_TEXT_GENERATION_MODEL_BY_PROVIDER, L as CodexSettings, R as CopilotSettings, Sr as TurnId, _r as RuntimeRequestId, gr as RuntimeItemId, hr as ProviderItemId, lr as EventId, x as TextGenerationError, zn as ProviderDriverKind } from "./collectUint8StreamText-COE2_gie.mjs";
|
|
4
4
|
import { Y as ServerConfig } from "./Metrics-6Xj17Se3.mjs";
|
|
5
5
|
import { E as buildServerProvider, F as ProviderAdapterRequestError, L as ProviderAdapterSessionNotFoundError, M as providerModelsFromSettings, P as ProviderAdapterProcessError, R as ProviderAdapterValidationError, T as buildSelectOptionDescriptor, Zt as makeManualOnlyProviderMaintenanceCapabilities, an as resolveAttachmentPath, cn as createModelCapabilities, g as makeEventNdjsonLogger, h as ProviderEventLoggers, k as isCommandMissingCause, mn as getProviderOptionStringSelectionValue, on as resolveCommandPath, t as makeServerQueueMetrics, un as getModelSelectionStringOptionValue, y as mergeProviderInstanceEnvironment, z as ProviderDriverError } from "./bin.mjs";
|
|
6
|
-
import { c as extractJsonObject, f as sanitizeThreadTitle, s as buildThreadTitlePrompt, t as makeManagedServerProvider } from "./makeManagedServerProvider-
|
|
6
|
+
import { c as extractJsonObject, f as sanitizeThreadTitle, s as buildThreadTitlePrompt, t as makeManagedServerProvider } from "./makeManagedServerProvider-D1_iEWGi.mjs";
|
|
7
7
|
import { t as defaultProviderContinuationIdentity } from "./ProviderDriver-kCV60GKk.mjs";
|
|
8
|
-
import { t as makeCodexTextGeneration } from "./CodexTextGeneration-
|
|
8
|
+
import { t as makeCodexTextGeneration } from "./CodexTextGeneration-CJV1jPda.mjs";
|
|
9
9
|
import { Effect, Queue, Random, Result, Schema, Stream } from "effect";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import "effect/unstable/process";
|
|
@@ -39,11 +39,12 @@ function toProviderItemId(value) {
|
|
|
39
39
|
return value ? ProviderItemId.make(value) : void 0;
|
|
40
40
|
}
|
|
41
41
|
function normalizeUsage(event) {
|
|
42
|
-
const
|
|
42
|
+
const directInputTokens = event.data.inputTokens ?? 0;
|
|
43
43
|
const outputTokens = event.data.outputTokens ?? 0;
|
|
44
44
|
const cachedInputTokens = event.data.cacheReadTokens ?? 0;
|
|
45
45
|
const reasoningOutputTokens = event.data.reasoningTokens ?? 0;
|
|
46
|
-
const
|
|
46
|
+
const inputTokens = directInputTokens + cachedInputTokens;
|
|
47
|
+
const usedTokens = inputTokens + outputTokens;
|
|
47
48
|
return {
|
|
48
49
|
usedTokens,
|
|
49
50
|
totalProcessedTokens: usedTokens,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const require_collectUint8StreamText = require("./collectUint8StreamText-
|
|
3
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-B-GW3u_2.cjs");
|
|
4
4
|
const require_Metrics = require("./Metrics-CIW1QH7M.cjs");
|
|
5
5
|
const require_bin = require("./bin.cjs");
|
|
6
|
-
const require_makeManagedServerProvider = require("./makeManagedServerProvider-
|
|
6
|
+
const require_makeManagedServerProvider = require("./makeManagedServerProvider-DTsQ87HL.cjs");
|
|
7
7
|
const require_ProviderDriver = require("./ProviderDriver--rNeAi3B.cjs");
|
|
8
|
-
const require_CodexTextGeneration = require("./CodexTextGeneration-
|
|
8
|
+
const require_CodexTextGeneration = require("./CodexTextGeneration-Db2hn8Qz.cjs");
|
|
9
9
|
let effect = require("effect");
|
|
10
10
|
let node_crypto = require("node:crypto");
|
|
11
11
|
require("effect/unstable/process");
|
|
@@ -39,11 +39,12 @@ function toProviderItemId(value) {
|
|
|
39
39
|
return value ? require_collectUint8StreamText.ProviderItemId.make(value) : void 0;
|
|
40
40
|
}
|
|
41
41
|
function normalizeUsage(event) {
|
|
42
|
-
const
|
|
42
|
+
const directInputTokens = event.data.inputTokens ?? 0;
|
|
43
43
|
const outputTokens = event.data.outputTokens ?? 0;
|
|
44
44
|
const cachedInputTokens = event.data.cacheReadTokens ?? 0;
|
|
45
45
|
const reasoningOutputTokens = event.data.reasoningTokens ?? 0;
|
|
46
|
-
const
|
|
46
|
+
const inputTokens = directInputTokens + cachedInputTokens;
|
|
47
|
+
const usedTokens = inputTokens + outputTokens;
|
|
47
48
|
return {
|
|
48
49
|
usedTokens,
|
|
49
50
|
totalProcessedTokens: usedTokens,
|
|
@@ -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-
|
|
4
|
+
const require_collectUint8StreamText = require("./collectUint8StreamText-B-GW3u_2.cjs");
|
|
5
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-DTsQ87HL.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);
|
|
@@ -4164,6 +4164,17 @@ function parseSessionUpdateEvent(params) {
|
|
|
4164
4164
|
rawPayload: params
|
|
4165
4165
|
});
|
|
4166
4166
|
break;
|
|
4167
|
+
case "usage_update":
|
|
4168
|
+
if (upd.used > 0) events.push({
|
|
4169
|
+
_tag: "UsageUpdated",
|
|
4170
|
+
usage: {
|
|
4171
|
+
usedTokens: upd.used,
|
|
4172
|
+
lastUsedTokens: upd.used,
|
|
4173
|
+
...upd.size > 0 ? { maxTokens: upd.size } : {}
|
|
4174
|
+
},
|
|
4175
|
+
rawPayload: params
|
|
4176
|
+
});
|
|
4177
|
+
break;
|
|
4167
4178
|
default: break;
|
|
4168
4179
|
}
|
|
4169
4180
|
return {
|
|
@@ -4582,7 +4593,8 @@ const PROVIDER$1 = require_collectUint8StreamText.ProviderDriverKind.make("curso
|
|
|
4582
4593
|
const CURSOR_PRESENTATION = {
|
|
4583
4594
|
displayName: "Cursor",
|
|
4584
4595
|
badgeLabel: "Early Access",
|
|
4585
|
-
showInteractionModeToggle: true
|
|
4596
|
+
showInteractionModeToggle: true,
|
|
4597
|
+
supportsAskMode: true
|
|
4586
4598
|
};
|
|
4587
4599
|
const EMPTY_CAPABILITIES = require_bin.createModelCapabilities({ optionDescriptors: [] });
|
|
4588
4600
|
const CURSOR_ACP_MODEL_DISCOVERY_TIMEOUT_MS = 15e3;
|
|
@@ -5554,6 +5566,21 @@ function makeAcpContentDeltaEvent(input) {
|
|
|
5554
5566
|
}
|
|
5555
5567
|
};
|
|
5556
5568
|
}
|
|
5569
|
+
function makeAcpTokenUsageEvent(input) {
|
|
5570
|
+
return {
|
|
5571
|
+
type: "thread.token-usage.updated",
|
|
5572
|
+
...input.stamp,
|
|
5573
|
+
provider: input.provider,
|
|
5574
|
+
threadId: input.threadId,
|
|
5575
|
+
turnId: input.turnId,
|
|
5576
|
+
payload: { usage: input.usage },
|
|
5577
|
+
raw: {
|
|
5578
|
+
source: "acp.jsonrpc",
|
|
5579
|
+
method: "session/update",
|
|
5580
|
+
payload: input.rawPayload
|
|
5581
|
+
}
|
|
5582
|
+
};
|
|
5583
|
+
}
|
|
5557
5584
|
//#endregion
|
|
5558
5585
|
//#region src/provider/acp/AcpNativeLogging.ts
|
|
5559
5586
|
function writeNativeAcpLog(input) {
|
|
@@ -5668,6 +5695,7 @@ function resolveRequestedModeId(input) {
|
|
|
5668
5695
|
const modeState = input.modeState;
|
|
5669
5696
|
if (!modeState) return;
|
|
5670
5697
|
if (input.interactionMode === "plan") return findModeByAliases(modeState.availableModes, ACP_PLAN_MODE_ALIASES)?.id;
|
|
5698
|
+
if (input.interactionMode === "ask") return findModeByAliases(modeState.availableModes, ACP_APPROVAL_MODE_ALIASES)?.id;
|
|
5671
5699
|
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;
|
|
5672
5700
|
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;
|
|
5673
5701
|
}
|
|
@@ -6083,6 +6111,17 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
6083
6111
|
rawPayload: event.rawPayload
|
|
6084
6112
|
}));
|
|
6085
6113
|
return;
|
|
6114
|
+
case "UsageUpdated":
|
|
6115
|
+
yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc");
|
|
6116
|
+
yield* offerRuntimeEvent(makeAcpTokenUsageEvent({
|
|
6117
|
+
stamp: yield* makeEventStamp(),
|
|
6118
|
+
provider: PROVIDER,
|
|
6119
|
+
threadId: ctx.threadId,
|
|
6120
|
+
turnId: ctx.activeTurnId,
|
|
6121
|
+
usage: event.usage,
|
|
6122
|
+
rawPayload: event.rawPayload
|
|
6123
|
+
}));
|
|
6124
|
+
return;
|
|
6086
6125
|
}
|
|
6087
6126
|
}))).pipe(effect.Effect.forkChild);
|
|
6088
6127
|
ctx.notificationFiber = nf;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
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-
|
|
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
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-
|
|
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";
|
|
@@ -4143,6 +4143,17 @@ function parseSessionUpdateEvent(params) {
|
|
|
4143
4143
|
rawPayload: params
|
|
4144
4144
|
});
|
|
4145
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;
|
|
4146
4157
|
default: break;
|
|
4147
4158
|
}
|
|
4148
4159
|
return {
|
|
@@ -4561,7 +4572,8 @@ const PROVIDER$1 = ProviderDriverKind.make("cursor");
|
|
|
4561
4572
|
const CURSOR_PRESENTATION = {
|
|
4562
4573
|
displayName: "Cursor",
|
|
4563
4574
|
badgeLabel: "Early Access",
|
|
4564
|
-
showInteractionModeToggle: true
|
|
4575
|
+
showInteractionModeToggle: true,
|
|
4576
|
+
supportsAskMode: true
|
|
4565
4577
|
};
|
|
4566
4578
|
const EMPTY_CAPABILITIES = createModelCapabilities({ optionDescriptors: [] });
|
|
4567
4579
|
const CURSOR_ACP_MODEL_DISCOVERY_TIMEOUT_MS = 15e3;
|
|
@@ -5533,6 +5545,21 @@ function makeAcpContentDeltaEvent(input) {
|
|
|
5533
5545
|
}
|
|
5534
5546
|
};
|
|
5535
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
|
+
}
|
|
5536
5563
|
//#endregion
|
|
5537
5564
|
//#region src/provider/acp/AcpNativeLogging.ts
|
|
5538
5565
|
function writeNativeAcpLog(input) {
|
|
@@ -5647,6 +5674,7 @@ function resolveRequestedModeId(input) {
|
|
|
5647
5674
|
const modeState = input.modeState;
|
|
5648
5675
|
if (!modeState) return;
|
|
5649
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;
|
|
5650
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;
|
|
5651
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;
|
|
5652
5680
|
}
|
|
@@ -6062,6 +6090,17 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
6062
6090
|
rawPayload: event.rawPayload
|
|
6063
6091
|
}));
|
|
6064
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;
|
|
6065
6104
|
}
|
|
6066
6105
|
}))).pipe(Effect.forkChild);
|
|
6067
6106
|
ctx.notificationFiber = nf;
|