ryco-cli 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -2
- package/dist/{AzureDevOpsSourceControlProvider-CdgNqZ5j.cjs → AzureDevOpsSourceControlProvider-5exivY-1.cjs} +2 -2
- package/dist/{AzureDevOpsSourceControlProvider-OsyDSESj.mjs → AzureDevOpsSourceControlProvider-CF5LuCHp.mjs} +3 -3
- package/dist/{BitbucketSourceControlProvider-DBTH98i4.cjs → BitbucketSourceControlProvider-1GWENqcl.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-SQ3gKdFs.mjs → BitbucketSourceControlProvider-CKH09tfT.mjs} +3 -3
- package/dist/{BunPTY-B_vjRZN4.mjs → BunPTY-BWhtEA50.mjs} +1 -1
- package/dist/{ClaudeDriver-D9yC2F0b.cjs → ClaudeDriver-BXLdjrht.cjs} +187 -8
- package/dist/{ClaudeDriver-2dTtrsFD.mjs → ClaudeDriver-WwWFTu61.mjs} +188 -9
- package/dist/{CodexDriver-CIDYevQX.mjs → CodexDriver-93-TmCrO.mjs} +16 -8
- package/dist/{CodexDriver-BC2B-qpT.cjs → CodexDriver-BboMT9uk.cjs} +15 -7
- package/dist/{CodexTextGeneration-DNeO-8GE.cjs → CodexTextGeneration-0pRbJji3.cjs} +3 -3
- package/dist/{CodexTextGeneration-CjknB1Xl.mjs → CodexTextGeneration-BU9Myn87.mjs} +4 -4
- package/dist/{CopilotDriver-NPhlLrk2.mjs → CopilotDriver-BASi8pJ0.mjs} +15 -8
- package/dist/{CopilotDriver-BGChrP5c.cjs → CopilotDriver-DCsv-17W.cjs} +14 -7
- package/dist/{CursorDriver-CYxn4_c1.cjs → CursorDriver-BTSiM3A8.cjs} +163 -16
- package/dist/{CursorDriver-BcAVbT8D.mjs → CursorDriver-D5LvIqUk.mjs} +164 -17
- package/dist/{ForgejoSourceControlProvider-D3wP2Cav.cjs → ForgejoSourceControlProvider-BTXRDCGB.cjs} +2 -2
- package/dist/{ForgejoSourceControlProvider-BjCE3730.mjs → ForgejoSourceControlProvider-e-4hvvZ_.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-DByZ_cnw.mjs → GitHubSourceControlProvider-26IofDAO.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-DU_7IvMa.cjs → GitHubSourceControlProvider-DWmwkA_y.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-BVJ5IqTS.cjs → GitLabSourceControlProvider-D-YHnxRe.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-BdMCIjXb.mjs → GitLabSourceControlProvider-DePct78W.mjs} +3 -3
- package/dist/{Metrics-BCOc3Ml2.mjs → Metrics-6Xj17Se3.mjs} +94 -2
- package/dist/{Metrics-DNOriWhP.cjs → Metrics-CIW1QH7M.cjs} +128 -0
- package/dist/{NodePTY-_u3kQLvd.mjs → NodePTY-C_cR3Ayy.mjs} +1 -1
- package/dist/{OpenCodeDriver-fwqXoVyH.mjs → OpenCodeDriver-BhvLOmvn.mjs} +336 -43
- package/dist/{OpenCodeDriver-DyR83FcY.cjs → OpenCodeDriver-CVeZ4n9-.cjs} +335 -42
- package/dist/{SourceControlProviderDiscoveryCatalog-DqQVhwYM.cjs → SourceControlProviderDiscoveryCatalog-DeFR5xH3.cjs} +98 -161
- package/dist/{SourceControlProviderDiscoveryCatalog-CQiMyDCC.mjs → SourceControlProviderDiscoveryCatalog-mJV_Xitr.mjs} +100 -145
- package/dist/bin.cjs +30639 -28744
- package/dist/bin.mjs +30602 -28709
- package/dist/client/assets/{AnimatedHeight-CYuVQOpY.js → AnimatedHeight-BSU0lzYs.js} +1 -1
- package/dist/client/assets/AppearanceSettings-D7q0ujGK.js +1 -0
- package/dist/client/assets/BranchToolbar.logic-CZIFSvhd.js +1 -0
- package/dist/client/assets/ChatRightPanel-CWHOIuiQ.js +188 -0
- package/dist/client/assets/ChatThreadRouteView-bA7xWXzc.js +1 -0
- package/dist/client/assets/CommandPaletteDialog-DNYaVOZO.js +1 -0
- package/dist/client/assets/CompositeRoot-B_KEfCUE.js +1 -0
- package/dist/client/assets/ConnectionsSettings-CLZPbx_K.js +1 -0
- package/dist/client/assets/DiagnosticsSettings-DtzPCb6N.js +1 -0
- package/dist/client/assets/DialogHandle-DuHnmWoE.js +1 -0
- package/dist/client/assets/{DialogRoot-DaMwpoP_.js → DialogRoot-BV25qAcA.js} +1 -1
- package/dist/client/assets/DialogTitle-DQsi-RTa.js +1 -0
- package/dist/client/assets/DialogTrigger-D0fA01C6.js +1 -0
- package/dist/client/assets/DialogViewport-CMV_BePU.js +1 -0
- package/dist/client/assets/DraftChatThreadRouteView-BoiKnrii.js +1 -0
- package/dist/client/assets/JetBrainsIcons-BcPxJlMf.js +1 -0
- package/dist/client/assets/KeybindingsSettings-LuI98pdF.js +7 -0
- package/dist/client/assets/McpServersSettings-BFMuWYVV.js +6 -0
- package/dist/client/assets/NoActiveThreadState-C2q_O1kP.js +1 -0
- package/dist/client/assets/OpinionatedPluginsSettings-Bqwct37O.js +1 -0
- package/dist/client/assets/ProjectFavicon-D2imiJ8M.js +1 -0
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-BFzNCo3I.js → ProviderUpdateLaunchNotification.logic-CJgA--nK.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-B97vbeu6.js +1 -0
- package/dist/client/assets/{RedactedSensitiveText-UnZZJnFF.js → RedactedSensitiveText-B2GFTyfq.js} +1 -1
- package/dist/client/assets/RootAppShell-C1xTR98P.js +12 -0
- package/dist/client/assets/SettingsDialog-Q0Q8O5oH.js +2 -0
- package/dist/client/assets/SourceControlSettings-KAvoPTNi.js +1 -0
- package/dist/client/assets/StatisticsPanel-BzsQ444K.js +64 -0
- package/dist/client/assets/ThreadStatusIndicators-Cw_jLVQf.js +1 -0
- package/dist/client/assets/{ThreadTerminalDrawer-BXoXAbsR.js → ThreadTerminalDrawer-D1WnSemH.js} +17 -17
- package/dist/client/assets/ThreadWorkspacePanel-L4qCPTOA.js +166 -0
- package/dist/client/assets/{alert-dialog-BJQbh5gX.js → alert-dialog-CNmKa0BK.js} +1 -1
- package/dist/client/assets/chart-column-BWSKYZ_a.js +1 -0
- package/dist/client/assets/{chatThreadActions--n7v5mnB.js → chatThreadActions-TtDsiwDC.js} +1 -1
- package/dist/client/assets/chevron-up-zopJ_99l.js +1 -0
- package/dist/client/assets/{clamp-NYtK3f5s.js → clamp-Ds6WJu8j.js} +1 -1
- package/dist/client/assets/clipboard-copy-BoJGpdmJ.js +1 -0
- package/dist/client/assets/clock-CzUHThzk.js +1 -0
- package/dist/client/assets/commandPaletteStore-KebG835b.js +1 -0
- package/dist/client/assets/composerDraftStore-DpPEQ6BN.js +21 -0
- package/dist/client/assets/desktopUpdateAtoms-BQ0GGEfM.js +2 -0
- package/dist/client/assets/{download-Bi4-cFbc.js → download-CUiRE0N9.js} +1 -1
- package/dist/client/assets/{draft-input-BGSRgOW7.js → draft-input-CwpGDtoT.js} +1 -1
- package/dist/client/assets/editorPreferences-jN7DKbyt.js +1 -0
- package/dist/client/assets/empty-CBuXePtg.js +1 -0
- package/dist/client/assets/{group-Dwm-OV-r.js → group-BpZvxjG5.js} +1 -1
- package/dist/client/assets/{index-BI5yFj9n.js → index-BKzXTNJ_.js} +2 -2
- package/dist/client/assets/{input-BfUa3JUD.js → input-CgDawd6k.js} +1 -1
- package/dist/client/assets/kbd-QYSL97CK.js +1 -0
- package/dist/client/assets/{keybindings--G1bkIjA.js → keybindings-CUTRYI_A.js} +1 -1
- package/dist/client/assets/{keyboard-B87VTfPa.js → keyboard-DFFiI7JY.js} +1 -1
- package/dist/client/assets/keyedQuery-DiOCbGH0.js +0 -0
- package/dist/client/assets/main-BgFGju3e.js +9 -0
- package/dist/client/assets/main-D0UFdwts.css +2 -0
- package/dist/client/assets/palette-BXCL909c.js +1 -0
- package/dist/client/assets/play-DI2LZohg.js +1 -0
- package/dist/client/assets/plus-DzgIfHUF.js +1 -0
- package/dist/client/assets/projectAtoms-DXXpuERK.js +1 -0
- package/dist/client/assets/providerDriverMeta-CRNNp0q3.js +1 -0
- package/dist/client/assets/providerIconUtils-D-DFhem2.js +47 -0
- package/dist/client/assets/radio-group-_PPYg3YY.js +1 -0
- package/dist/client/assets/{refresh-cw-CRxaXR0E.js → refresh-cw-BsQTNBXl.js} +1 -1
- package/dist/client/assets/{resolveAriaLabelledBy-D4fWpj84.js → resolveAriaLabelledBy-CRHo_s16.js} +1 -1
- package/dist/client/assets/rightPanelRouteSearch-CfmZ7osj.js +1 -0
- package/dist/client/assets/scale-DDEJ-tvn.js +1 -0
- package/dist/client/assets/scroll-area-HgsI-ErG.js +1 -0
- package/dist/client/assets/separator-ClnL4mUB.js +1 -0
- package/dist/client/assets/{server-tdx7WxLI.js → server-Bbs3L-6_.js} +1 -1
- package/dist/client/assets/session-logic-CKQkgIwo.js +4 -0
- package/dist/client/assets/settingsDialogStore-SG-W1q0A.js +1 -0
- package/dist/client/assets/settingsLayout-G5xVm-ZT.js +1 -0
- package/dist/client/assets/shallow-Dmd-gez1.js +1 -0
- package/dist/client/assets/sidebar-_u7SGgmC.js +1 -0
- package/dist/client/assets/sidebarStatusText-BTYnwflG.js +1 -0
- package/dist/client/assets/skeleton-CmUvhZGP.js +1 -0
- package/dist/client/assets/storeSelectors-DhJRpdiw.js +1 -0
- package/dist/client/assets/threadSelectionStore-ygmA4DNA.js +1 -0
- package/dist/client/assets/toast-DmA_ziPT.js +1 -0
- package/dist/client/assets/toggle-DGS7tKuj.js +1 -0
- package/dist/client/assets/{toggle-group-DdKXHoT3.js → toggle-group-Dtv1ZUFW.js} +1 -1
- package/dist/client/assets/tokenModePresentation-Dor1DnBx.js +1 -0
- package/dist/client/assets/{trash-2-CZQem-sz.js → trash-2-C2G3VGoV.js} +1 -1
- package/dist/client/assets/triangle-alert-Bpz3xGu5.js +1 -0
- package/dist/client/assets/undo-2-C3rtxuqZ.js +1 -0
- package/dist/client/assets/useHandleNewThread-ypSbzG0P.js +1 -0
- package/dist/client/assets/useLabelableId-Bc7KEnHU.js +1 -0
- package/dist/client/assets/useNavigate-_4hWGSey.js +1 -0
- package/dist/client/assets/useTheme-HcKmBfpF.js +1 -0
- package/dist/client/assets/{vscode-icons-E8NUFd62.js → vscode-icons-DdSTtxYd.js} +1 -1
- package/dist/client/assets/{wrench-DEteICtk.js → wrench-C4jdis40.js} +1 -1
- package/dist/client/assets/x-CG2WU63t.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/{collectUint8StreamText-DuFJyaQh.mjs → collectUint8StreamText-Lv4GGI79.mjs} +488 -16
- package/dist/{collectUint8StreamText-DbCOJom3.cjs → collectUint8StreamText-uNXVRHOf.cjs} +510 -14
- package/dist/{makeManagedServerProvider-C3cQUDkZ.cjs → makeManagedServerProvider-3SD-Q5xh.cjs} +1 -1
- package/dist/{makeManagedServerProvider-wFGZ2-vd.mjs → makeManagedServerProvider-CkPEptun.mjs} +2 -2
- package/package.json +1 -1
- package/dist/client/assets/AppearanceSettings-BBbC8CV5.js +0 -1
- package/dist/client/assets/BranchToolbar.logic-Di2EkKiO.js +0 -1
- package/dist/client/assets/ChatRightPanel-BJ_cVP66.js +0 -188
- package/dist/client/assets/ChatThreadRouteView-DmxD3m2U.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-CAzz6bsT.js +0 -1
- package/dist/client/assets/CompositeRoot-BvXCwn2c.js +0 -1
- package/dist/client/assets/ConnectionsSettings-Cmxm0y2u.js +0 -1
- package/dist/client/assets/DialogHandle-CXNAm3QY.js +0 -1
- package/dist/client/assets/DialogTitle-KXmfgzP3.js +0 -1
- package/dist/client/assets/DialogTrigger-NHyQnW3X.js +0 -1
- package/dist/client/assets/DialogViewport-CL0WR9a5.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-C_hqauF6.js +0 -1
- package/dist/client/assets/JetBrainsIcons-BcR8pCma.js +0 -1
- package/dist/client/assets/KeybindingsSettings-m2AteGOl.js +0 -7
- package/dist/client/assets/McpServersSettings-DndIDxgA.js +0 -6
- package/dist/client/assets/NoActiveThreadState-Bt-Wkv-C.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-oDtdE6qx.js +0 -1
- package/dist/client/assets/ProjectFavicon-j9IX_7-B.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-CvlIBNVJ.js +0 -1
- package/dist/client/assets/QueryClientProvider-BZxRKpeb.js +0 -1
- package/dist/client/assets/RootAppShell-CyHZ_F5P.js +0 -12
- package/dist/client/assets/SettingsDialog-BYJ8AhQp.js +0 -2
- package/dist/client/assets/SourceControlSettings-7xU6VH6N.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-M9FWDEex.js +0 -1
- package/dist/client/assets/ThreadWorkspacePanel-D1J63TVD.js +0 -166
- package/dist/client/assets/codexUsageLimits-BJQiZCqn.js +0 -1
- package/dist/client/assets/commandPaletteStore-oFMPKPmp.js +0 -1
- package/dist/client/assets/composerDraftStore-xu3n5gdX.js +0 -21
- package/dist/client/assets/desktopUpdateReactQuery-YSCkifKp.js +0 -2
- package/dist/client/assets/empty-BTxheW4B.js +0 -1
- package/dist/client/assets/environmentApi-BFHi_M02.js +0 -1
- package/dist/client/assets/folder-open-DJmHEPv9.js +0 -1
- package/dist/client/assets/kbd-Dd57M8OY.js +0 -1
- package/dist/client/assets/main-BQf5U-fz.js +0 -9
- package/dist/client/assets/main-DrwkwNo9.css +0 -2
- package/dist/client/assets/mutation-DJZgOJRu.js +0 -1
- package/dist/client/assets/plus-B10j9MbZ.js +0 -1
- package/dist/client/assets/providerDriverMeta-B6xuq7ij.js +0 -1
- package/dist/client/assets/providerIconUtils-Ch6hejVW.js +0 -47
- package/dist/client/assets/rightPanelRouteSearch-CTMFCS6R.js +0 -1
- package/dist/client/assets/scroll-area-BgFq7GRd.js +0 -1
- package/dist/client/assets/separator-CB3Ctlvi.js +0 -1
- package/dist/client/assets/session-logic-CaiGe4hy.js +0 -4
- package/dist/client/assets/settingsDialogStore-9vo22xKp.js +0 -1
- package/dist/client/assets/settingsLayout-B5o13iGO.js +0 -1
- package/dist/client/assets/sidebar-Bbdql7Af.js +0 -1
- package/dist/client/assets/skeleton-C8OZcsPq.js +0 -1
- package/dist/client/assets/storeSelectors-DBRyhCGm.js +0 -1
- package/dist/client/assets/threadRoutes-CfldSp4X.js +0 -1
- package/dist/client/assets/threadSelectionStore-BggKwzmQ.js +0 -1
- package/dist/client/assets/toast-DE-WwLMa.js +0 -1
- package/dist/client/assets/toggle-BFMa0a0Y.js +0 -1
- package/dist/client/assets/useHandleNewThread-DOPZAFqE.js +0 -1
- package/dist/client/assets/useLabelableId-BzWaBebJ.js +0 -1
- package/dist/client/assets/useNavigate-B1qgM5mt.js +0 -1
- package/dist/client/assets/useTheme-C7Ji7x06.js +0 -1
- package/dist/client/assets/x-b9324xm-.js +0 -1
- package/dist/{NodeSqliteClient-BXy61fAd.mjs → NodeSqliteClient-A1TEgwj_.mjs} +1 -1
- package/dist/{NodeSqliteClient-homCO8-6.cjs → NodeSqliteClient-B5aDHbNc.cjs} +2 -2
|
@@ -37,6 +37,7 @@ makeEntityId("RuntimeSessionId");
|
|
|
37
37
|
const RuntimeItemId = makeEntityId("RuntimeItemId");
|
|
38
38
|
const RuntimeRequestId = makeEntityId("RuntimeRequestId");
|
|
39
39
|
const RuntimeTaskId = makeEntityId("RuntimeTaskId");
|
|
40
|
+
const RuntimeSubagentId = makeEntityId("RuntimeSubagentId");
|
|
40
41
|
const ApprovalRequestId = makeEntityId("ApprovalRequestId");
|
|
41
42
|
const CheckpointRef = makeEntityId("CheckpointRef");
|
|
42
43
|
//#endregion
|
|
@@ -346,7 +347,7 @@ const AdvertisedEndpointCompatibility = effect.Schema.Struct({
|
|
|
346
347
|
hostedHttpsApp: AdvertisedEndpointHostedHttpsCompatibility,
|
|
347
348
|
desktopApp: effect.Schema.Literals(["compatible", "unknown"])
|
|
348
349
|
});
|
|
349
|
-
effect.Schema.Struct({
|
|
350
|
+
const AdvertisedEndpoint = effect.Schema.Struct({
|
|
350
351
|
id: TrimmedNonEmptyString,
|
|
351
352
|
label: TrimmedNonEmptyString,
|
|
352
353
|
provider: AdvertisedEndpointProvider,
|
|
@@ -873,6 +874,8 @@ const MODEL_SLUG_ALIASES_BY_PROVIDER = {
|
|
|
873
874
|
"gpt-5.3-spark": "gpt-5.3-codex-spark"
|
|
874
875
|
},
|
|
875
876
|
[CLAUDE_DRIVER_KIND]: {
|
|
877
|
+
fable: "claude-fable-5",
|
|
878
|
+
"fable-5": "claude-fable-5",
|
|
876
879
|
opus: "claude-opus-4-8",
|
|
877
880
|
"opus-4.8": "claude-opus-4-8",
|
|
878
881
|
"claude-opus-4.8": "claude-opus-4-8",
|
|
@@ -3364,6 +3367,10 @@ effect.Schema.Literals([
|
|
|
3364
3367
|
"task.started",
|
|
3365
3368
|
"task.progress",
|
|
3366
3369
|
"task.completed",
|
|
3370
|
+
"subagent.started",
|
|
3371
|
+
"subagent.updated",
|
|
3372
|
+
"subagent.completed",
|
|
3373
|
+
"subagent.message.delta",
|
|
3367
3374
|
"hook.started",
|
|
3368
3375
|
"hook.progress",
|
|
3369
3376
|
"hook.completed",
|
|
@@ -3413,6 +3420,10 @@ const UserInputResolvedType = effect.Schema.Literal("user-input.resolved");
|
|
|
3413
3420
|
const TaskStartedType = effect.Schema.Literal("task.started");
|
|
3414
3421
|
const TaskProgressType = effect.Schema.Literal("task.progress");
|
|
3415
3422
|
const TaskCompletedType = effect.Schema.Literal("task.completed");
|
|
3423
|
+
const SubagentStartedType = effect.Schema.Literal("subagent.started");
|
|
3424
|
+
const SubagentUpdatedType = effect.Schema.Literal("subagent.updated");
|
|
3425
|
+
const SubagentCompletedType = effect.Schema.Literal("subagent.completed");
|
|
3426
|
+
const SubagentMessageDeltaType = effect.Schema.Literal("subagent.message.delta");
|
|
3416
3427
|
const HookStartedType = effect.Schema.Literal("hook.started");
|
|
3417
3428
|
const HookProgressType = effect.Schema.Literal("hook.progress");
|
|
3418
3429
|
const HookCompletedType = effect.Schema.Literal("hook.completed");
|
|
@@ -3571,6 +3582,59 @@ const TaskCompletedPayload = effect.Schema.Struct({
|
|
|
3571
3582
|
summary: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3572
3583
|
usage: effect.Schema.optional(effect.Schema.Unknown)
|
|
3573
3584
|
});
|
|
3585
|
+
const RuntimeSubagentOrigin = effect.Schema.Literals(["native", "inferred"]);
|
|
3586
|
+
const RuntimeSubagentCapability = effect.Schema.Literals(["transcript", "summary"]);
|
|
3587
|
+
const RuntimeSubagentStatus = effect.Schema.Literals([
|
|
3588
|
+
"starting",
|
|
3589
|
+
"running",
|
|
3590
|
+
"completed",
|
|
3591
|
+
"failed",
|
|
3592
|
+
"stopped"
|
|
3593
|
+
]);
|
|
3594
|
+
const SubagentRef = effect.Schema.Struct({
|
|
3595
|
+
subagentId: RuntimeSubagentId,
|
|
3596
|
+
origin: RuntimeSubagentOrigin,
|
|
3597
|
+
capability: RuntimeSubagentCapability,
|
|
3598
|
+
label: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3599
|
+
description: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3600
|
+
providerSessionId: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3601
|
+
providerThreadId: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3602
|
+
providerTaskId: effect.Schema.optional(RuntimeTaskId),
|
|
3603
|
+
parentProviderItemId: effect.Schema.optional(ProviderItemId),
|
|
3604
|
+
metadata: effect.Schema.optional(UnknownRecordSchema)
|
|
3605
|
+
});
|
|
3606
|
+
const SubagentStartedPayload = effect.Schema.Struct({ subagent: SubagentRef });
|
|
3607
|
+
const SubagentUpdatedPayload = effect.Schema.Struct({
|
|
3608
|
+
subagent: SubagentRef,
|
|
3609
|
+
status: effect.Schema.optional(RuntimeSubagentStatus),
|
|
3610
|
+
summary: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3611
|
+
detail: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3612
|
+
usage: effect.Schema.optional(effect.Schema.Unknown)
|
|
3613
|
+
});
|
|
3614
|
+
const SubagentCompletedPayload = effect.Schema.Struct({
|
|
3615
|
+
subagent: SubagentRef,
|
|
3616
|
+
status: effect.Schema.Literals([
|
|
3617
|
+
"completed",
|
|
3618
|
+
"failed",
|
|
3619
|
+
"stopped"
|
|
3620
|
+
]),
|
|
3621
|
+
summary: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3622
|
+
usage: effect.Schema.optional(effect.Schema.Unknown)
|
|
3623
|
+
});
|
|
3624
|
+
const SubagentMessageDeltaPayload = effect.Schema.Struct({
|
|
3625
|
+
subagentId: RuntimeSubagentId,
|
|
3626
|
+
delta: effect.Schema.String,
|
|
3627
|
+
streamKind: effect.Schema.optional(RuntimeContentStreamKind),
|
|
3628
|
+
role: effect.Schema.optional(effect.Schema.Literals([
|
|
3629
|
+
"assistant",
|
|
3630
|
+
"user",
|
|
3631
|
+
"system"
|
|
3632
|
+
])),
|
|
3633
|
+
providerSessionId: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3634
|
+
providerThreadId: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3635
|
+
providerMessageId: effect.Schema.optional(TrimmedNonEmptyStringSchema$1),
|
|
3636
|
+
contentIndex: effect.Schema.optional(effect.Schema.Int)
|
|
3637
|
+
});
|
|
3574
3638
|
const HookStartedPayload = effect.Schema.Struct({
|
|
3575
3639
|
hookId: TrimmedNonEmptyStringSchema$1,
|
|
3576
3640
|
hookName: TrimmedNonEmptyStringSchema$1,
|
|
@@ -3812,6 +3876,26 @@ const ProviderRuntimeTaskCompletedEvent = effect.Schema.Struct({
|
|
|
3812
3876
|
type: TaskCompletedType,
|
|
3813
3877
|
payload: TaskCompletedPayload
|
|
3814
3878
|
});
|
|
3879
|
+
const ProviderRuntimeSubagentStartedEvent = effect.Schema.Struct({
|
|
3880
|
+
...ProviderRuntimeEventBase.fields,
|
|
3881
|
+
type: SubagentStartedType,
|
|
3882
|
+
payload: SubagentStartedPayload
|
|
3883
|
+
});
|
|
3884
|
+
const ProviderRuntimeSubagentUpdatedEvent = effect.Schema.Struct({
|
|
3885
|
+
...ProviderRuntimeEventBase.fields,
|
|
3886
|
+
type: SubagentUpdatedType,
|
|
3887
|
+
payload: SubagentUpdatedPayload
|
|
3888
|
+
});
|
|
3889
|
+
const ProviderRuntimeSubagentCompletedEvent = effect.Schema.Struct({
|
|
3890
|
+
...ProviderRuntimeEventBase.fields,
|
|
3891
|
+
type: SubagentCompletedType,
|
|
3892
|
+
payload: SubagentCompletedPayload
|
|
3893
|
+
});
|
|
3894
|
+
const ProviderRuntimeSubagentMessageDeltaEvent = effect.Schema.Struct({
|
|
3895
|
+
...ProviderRuntimeEventBase.fields,
|
|
3896
|
+
type: SubagentMessageDeltaType,
|
|
3897
|
+
payload: SubagentMessageDeltaPayload
|
|
3898
|
+
});
|
|
3815
3899
|
const ProviderRuntimeHookStartedEvent = effect.Schema.Struct({
|
|
3816
3900
|
...ProviderRuntimeEventBase.fields,
|
|
3817
3901
|
type: HookStartedType,
|
|
@@ -3929,6 +4013,10 @@ effect.Schema.Union([
|
|
|
3929
4013
|
ProviderRuntimeTaskStartedEvent,
|
|
3930
4014
|
ProviderRuntimeTaskProgressEvent,
|
|
3931
4015
|
ProviderRuntimeTaskCompletedEvent,
|
|
4016
|
+
ProviderRuntimeSubagentStartedEvent,
|
|
4017
|
+
ProviderRuntimeSubagentUpdatedEvent,
|
|
4018
|
+
ProviderRuntimeSubagentCompletedEvent,
|
|
4019
|
+
ProviderRuntimeSubagentMessageDeltaEvent,
|
|
3932
4020
|
ProviderRuntimeHookStartedEvent,
|
|
3933
4021
|
ProviderRuntimeHookProgressEvent,
|
|
3934
4022
|
ProviderRuntimeHookCompletedEvent,
|
|
@@ -4085,7 +4173,7 @@ const GitStatusPollIntervalMs = effect_Schema.Literals([
|
|
|
4085
4173
|
3e5
|
|
4086
4174
|
]);
|
|
4087
4175
|
const ClientSettingsSchema = effect_Schema.Struct({
|
|
4088
|
-
autoOpenPlanSidebar: effect_Schema.Boolean.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(
|
|
4176
|
+
autoOpenPlanSidebar: effect_Schema.Boolean.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(false))),
|
|
4089
4177
|
confirmThreadArchive: effect_Schema.Boolean.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(false))),
|
|
4090
4178
|
confirmThreadDelete: effect_Schema.Boolean.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(true))),
|
|
4091
4179
|
dismissedProviderUpdateNotificationKeys: effect_Schema.Array(TrimmedNonEmptyString).pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed([]))),
|
|
@@ -4251,6 +4339,7 @@ const ObservabilitySettings = effect_Schema.Struct({
|
|
|
4251
4339
|
});
|
|
4252
4340
|
const ServerSettings = effect_Schema.Struct({
|
|
4253
4341
|
enableAssistantStreaming: effect_Schema.Boolean.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(false))),
|
|
4342
|
+
enableProviderUpdateChecks: effect_Schema.Boolean.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(true))),
|
|
4254
4343
|
defaultThreadEnvMode: ThreadEnvMode.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed("local"))),
|
|
4255
4344
|
defaultAgentTokenMode: AgentTokenMode.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(DEFAULT_AGENT_TOKEN_MODE))),
|
|
4256
4345
|
addProjectBaseDirectory: TrimmedString.pipe(effect_Schema.withDecodingDefault(effect.Effect.succeed(""))),
|
|
@@ -4321,6 +4410,7 @@ const OpenCodeSettingsPatch = effect_Schema.Struct({
|
|
|
4321
4410
|
});
|
|
4322
4411
|
const ServerSettingsPatch = effect_Schema.Struct({
|
|
4323
4412
|
enableAssistantStreaming: effect_Schema.optionalKey(effect_Schema.Boolean),
|
|
4413
|
+
enableProviderUpdateChecks: effect_Schema.optionalKey(effect_Schema.Boolean),
|
|
4324
4414
|
defaultThreadEnvMode: effect_Schema.optionalKey(ThreadEnvMode),
|
|
4325
4415
|
defaultAgentTokenMode: effect_Schema.optionalKey(AgentTokenMode),
|
|
4326
4416
|
addProjectBaseDirectory: effect_Schema.optionalKey(effect_Schema.String),
|
|
@@ -4521,13 +4611,24 @@ const ServerProvider = effect.Schema.Struct({
|
|
|
4521
4611
|
updateState: effect.Schema.optionalKey(ServerProviderUpdateState)
|
|
4522
4612
|
});
|
|
4523
4613
|
const ServerProviders = effect.Schema.Array(ServerProvider);
|
|
4614
|
+
const ServerLocalDiagnosticsMetrics = effect.Schema.Struct({
|
|
4615
|
+
turnQuiescenceAvgMs: effect.Schema.NullOr(effect.Schema.Number),
|
|
4616
|
+
checkpointDurationP95Ms: effect.Schema.NullOr(effect.Schema.Number),
|
|
4617
|
+
wsReconnectCount: NonNegativeInt,
|
|
4618
|
+
windowSampleCounts: effect.Schema.Struct({
|
|
4619
|
+
turnQuiescence: NonNegativeInt,
|
|
4620
|
+
checkpointDuration: NonNegativeInt
|
|
4621
|
+
}),
|
|
4622
|
+
capturedAt: IsoDateTime
|
|
4623
|
+
});
|
|
4524
4624
|
const ServerObservability = effect.Schema.Struct({
|
|
4525
4625
|
logsDirectoryPath: TrimmedNonEmptyString,
|
|
4526
4626
|
localTracingEnabled: effect.Schema.Boolean,
|
|
4527
4627
|
otlpTracesUrl: effect.Schema.optional(TrimmedNonEmptyString),
|
|
4528
4628
|
otlpTracesEnabled: effect.Schema.Boolean,
|
|
4529
4629
|
otlpMetricsUrl: effect.Schema.optional(TrimmedNonEmptyString),
|
|
4530
|
-
otlpMetricsEnabled: effect.Schema.Boolean
|
|
4630
|
+
otlpMetricsEnabled: effect.Schema.Boolean,
|
|
4631
|
+
localMetrics: effect.Schema.optional(ServerLocalDiagnosticsMetrics)
|
|
4531
4632
|
});
|
|
4532
4633
|
const ServerConfig = effect.Schema.Struct({
|
|
4533
4634
|
environment: ExecutionEnvironmentDescriptor,
|
|
@@ -4627,6 +4728,298 @@ var ServerProviderUpdateError = class extends effect.Schema.TaggedErrorClass()("
|
|
|
4627
4728
|
}
|
|
4628
4729
|
};
|
|
4629
4730
|
//#endregion
|
|
4731
|
+
//#region ../../packages/contracts/src/diagnostics.ts
|
|
4732
|
+
const DiagnosticsWarning = effect.Schema.Struct({
|
|
4733
|
+
code: TrimmedNonEmptyString,
|
|
4734
|
+
message: TrimmedNonEmptyString,
|
|
4735
|
+
source: effect.Schema.optional(TrimmedNonEmptyString),
|
|
4736
|
+
count: effect.Schema.optional(NonNegativeInt)
|
|
4737
|
+
});
|
|
4738
|
+
const DiagnosticsObservability = effect.Schema.Struct({
|
|
4739
|
+
logsDirectoryPath: TrimmedNonEmptyString,
|
|
4740
|
+
serverLogPath: TrimmedNonEmptyString,
|
|
4741
|
+
serverTracePath: TrimmedNonEmptyString,
|
|
4742
|
+
providerEventLogPath: TrimmedNonEmptyString,
|
|
4743
|
+
localTracingEnabled: effect.Schema.Boolean,
|
|
4744
|
+
otlpTracesUrl: effect.Schema.optional(TrimmedNonEmptyString),
|
|
4745
|
+
otlpTracesEnabled: effect.Schema.Boolean,
|
|
4746
|
+
otlpMetricsUrl: effect.Schema.optional(TrimmedNonEmptyString),
|
|
4747
|
+
otlpMetricsEnabled: effect.Schema.Boolean
|
|
4748
|
+
});
|
|
4749
|
+
const DiagnosticsResourceMemory = effect.Schema.Struct({
|
|
4750
|
+
rssBytes: NonNegativeInt,
|
|
4751
|
+
heapUsedBytes: NonNegativeInt,
|
|
4752
|
+
heapTotalBytes: NonNegativeInt,
|
|
4753
|
+
externalBytes: NonNegativeInt,
|
|
4754
|
+
arrayBuffersBytes: NonNegativeInt
|
|
4755
|
+
});
|
|
4756
|
+
const DiagnosticsResourceCpu = effect.Schema.Struct({
|
|
4757
|
+
userMicros: NonNegativeInt,
|
|
4758
|
+
systemMicros: NonNegativeInt,
|
|
4759
|
+
utilizationPercent: effect.Schema.optional(effect.Schema.Number)
|
|
4760
|
+
});
|
|
4761
|
+
const DiagnosticsResourceSample = effect.Schema.Struct({
|
|
4762
|
+
sampledAt: IsoDateTime,
|
|
4763
|
+
uptimeMs: NonNegativeInt,
|
|
4764
|
+
memory: DiagnosticsResourceMemory,
|
|
4765
|
+
cpu: DiagnosticsResourceCpu,
|
|
4766
|
+
eventLoopDelayMs: effect.Schema.optional(effect.Schema.Number)
|
|
4767
|
+
});
|
|
4768
|
+
const DiagnosticsResources = effect.Schema.Struct({
|
|
4769
|
+
current: DiagnosticsResourceSample,
|
|
4770
|
+
history: effect.Schema.Array(DiagnosticsResourceSample)
|
|
4771
|
+
});
|
|
4772
|
+
const DiagnosticsServerProcess = effect.Schema.Struct({
|
|
4773
|
+
pid: NonNegativeInt,
|
|
4774
|
+
platform: TrimmedNonEmptyString,
|
|
4775
|
+
runtime: TrimmedNonEmptyString,
|
|
4776
|
+
version: TrimmedNonEmptyString,
|
|
4777
|
+
cwd: TrimmedNonEmptyString
|
|
4778
|
+
});
|
|
4779
|
+
const DiagnosticsTerminalProcess = effect.Schema.Struct({
|
|
4780
|
+
threadId: TrimmedNonEmptyString,
|
|
4781
|
+
terminalId: TrimmedNonEmptyString,
|
|
4782
|
+
cwd: TrimmedNonEmptyString,
|
|
4783
|
+
worktreePath: effect.Schema.NullOr(TrimmedNonEmptyString),
|
|
4784
|
+
status: TerminalSessionStatus,
|
|
4785
|
+
pid: effect.Schema.NullOr(NonNegativeInt),
|
|
4786
|
+
hasRunningSubprocess: effect.Schema.Boolean,
|
|
4787
|
+
exitCode: effect.Schema.NullOr(effect.Schema.Int),
|
|
4788
|
+
exitSignal: effect.Schema.NullOr(effect.Schema.Int),
|
|
4789
|
+
updatedAt: IsoDateTime
|
|
4790
|
+
});
|
|
4791
|
+
const DiagnosticsProviderProcess = effect.Schema.Struct({
|
|
4792
|
+
instanceId: ProviderInstanceId,
|
|
4793
|
+
driver: ProviderDriverKind,
|
|
4794
|
+
displayName: effect.Schema.optional(TrimmedNonEmptyString),
|
|
4795
|
+
enabled: effect.Schema.Boolean,
|
|
4796
|
+
installed: effect.Schema.Boolean,
|
|
4797
|
+
status: ServerProviderState,
|
|
4798
|
+
checkedAt: IsoDateTime,
|
|
4799
|
+
message: effect.Schema.optional(TrimmedNonEmptyString)
|
|
4800
|
+
});
|
|
4801
|
+
const DiagnosticsLiveProcesses = effect.Schema.Struct({
|
|
4802
|
+
server: DiagnosticsServerProcess,
|
|
4803
|
+
terminals: effect.Schema.Array(DiagnosticsTerminalProcess),
|
|
4804
|
+
providers: effect.Schema.Array(DiagnosticsProviderProcess)
|
|
4805
|
+
});
|
|
4806
|
+
const DiagnosticsSpanStatus = effect.Schema.Literals([
|
|
4807
|
+
"success",
|
|
4808
|
+
"failure",
|
|
4809
|
+
"interrupted",
|
|
4810
|
+
"error",
|
|
4811
|
+
"unset"
|
|
4812
|
+
]);
|
|
4813
|
+
const DiagnosticsSpanSource = effect.Schema.Literals([
|
|
4814
|
+
"server",
|
|
4815
|
+
"browser",
|
|
4816
|
+
"unknown"
|
|
4817
|
+
]);
|
|
4818
|
+
const DiagnosticsSpan = effect.Schema.Struct({
|
|
4819
|
+
id: TrimmedNonEmptyString,
|
|
4820
|
+
source: DiagnosticsSpanSource,
|
|
4821
|
+
traceId: TrimmedNonEmptyString,
|
|
4822
|
+
spanId: TrimmedNonEmptyString,
|
|
4823
|
+
parentSpanId: effect.Schema.optional(TrimmedNonEmptyString),
|
|
4824
|
+
name: TrimmedNonEmptyString,
|
|
4825
|
+
kind: TrimmedNonEmptyString,
|
|
4826
|
+
startTime: IsoDateTime,
|
|
4827
|
+
endTime: IsoDateTime,
|
|
4828
|
+
durationMs: effect.Schema.Number,
|
|
4829
|
+
status: DiagnosticsSpanStatus,
|
|
4830
|
+
failureMessage: effect.Schema.optional(effect.Schema.String),
|
|
4831
|
+
attributes: effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown)
|
|
4832
|
+
});
|
|
4833
|
+
const DiagnosticsSpanEvent = effect.Schema.Struct({
|
|
4834
|
+
traceId: TrimmedNonEmptyString,
|
|
4835
|
+
spanId: TrimmedNonEmptyString,
|
|
4836
|
+
spanName: TrimmedNonEmptyString,
|
|
4837
|
+
name: TrimmedNonEmptyString,
|
|
4838
|
+
time: IsoDateTime,
|
|
4839
|
+
attributes: effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown)
|
|
4840
|
+
});
|
|
4841
|
+
const DiagnosticsSpanNameSummary = effect.Schema.Struct({
|
|
4842
|
+
name: TrimmedNonEmptyString,
|
|
4843
|
+
count: NonNegativeInt,
|
|
4844
|
+
failureCount: NonNegativeInt,
|
|
4845
|
+
totalDurationMs: effect.Schema.Number,
|
|
4846
|
+
averageDurationMs: effect.Schema.Number,
|
|
4847
|
+
maxDurationMs: effect.Schema.Number
|
|
4848
|
+
});
|
|
4849
|
+
const DiagnosticsDurationBucket = effect.Schema.Struct({
|
|
4850
|
+
label: TrimmedNonEmptyString,
|
|
4851
|
+
minMs: NonNegativeInt,
|
|
4852
|
+
maxMs: effect.Schema.optional(NonNegativeInt),
|
|
4853
|
+
count: NonNegativeInt
|
|
4854
|
+
});
|
|
4855
|
+
const DiagnosticsTracing = effect.Schema.Struct({
|
|
4856
|
+
retainedSpanCount: NonNegativeInt,
|
|
4857
|
+
recentSpans: effect.Schema.Array(DiagnosticsSpan),
|
|
4858
|
+
slowestSpans: effect.Schema.Array(DiagnosticsSpan),
|
|
4859
|
+
topSpanNames: effect.Schema.Array(DiagnosticsSpanNameSummary),
|
|
4860
|
+
durationBuckets: effect.Schema.Array(DiagnosticsDurationBucket),
|
|
4861
|
+
recentEvents: effect.Schema.Array(DiagnosticsSpanEvent)
|
|
4862
|
+
});
|
|
4863
|
+
const DiagnosticsFailure = effect.Schema.Struct({
|
|
4864
|
+
id: TrimmedNonEmptyString,
|
|
4865
|
+
occurredAt: IsoDateTime,
|
|
4866
|
+
source: TrimmedNonEmptyString,
|
|
4867
|
+
category: TrimmedNonEmptyString,
|
|
4868
|
+
signature: TrimmedNonEmptyString,
|
|
4869
|
+
message: effect.Schema.String,
|
|
4870
|
+
raw: effect.Schema.optional(effect.Schema.Unknown)
|
|
4871
|
+
});
|
|
4872
|
+
const DiagnosticsFailureSummary = effect.Schema.Struct({
|
|
4873
|
+
signature: TrimmedNonEmptyString,
|
|
4874
|
+
source: TrimmedNonEmptyString,
|
|
4875
|
+
category: TrimmedNonEmptyString,
|
|
4876
|
+
count: NonNegativeInt,
|
|
4877
|
+
latestAt: IsoDateTime,
|
|
4878
|
+
sampleMessage: effect.Schema.String
|
|
4879
|
+
});
|
|
4880
|
+
const DiagnosticsFailures = effect.Schema.Struct({
|
|
4881
|
+
latest: effect.Schema.Array(DiagnosticsFailure),
|
|
4882
|
+
common: effect.Schema.Array(DiagnosticsFailureSummary)
|
|
4883
|
+
});
|
|
4884
|
+
const DiagnosticsClientSlowRpcAck = effect.Schema.Struct({
|
|
4885
|
+
requestId: TrimmedNonEmptyString,
|
|
4886
|
+
tag: TrimmedNonEmptyString,
|
|
4887
|
+
startedAt: IsoDateTime,
|
|
4888
|
+
thresholdMs: NonNegativeInt
|
|
4889
|
+
});
|
|
4890
|
+
const DiagnosticsClient = effect.Schema.Struct({ slowRpcAcks: effect.Schema.Array(DiagnosticsClientSlowRpcAck) });
|
|
4891
|
+
const DiagnosticsLimits = effect.Schema.Struct({
|
|
4892
|
+
traceRecordLimit: NonNegativeInt,
|
|
4893
|
+
resourceSampleLimit: NonNegativeInt,
|
|
4894
|
+
fileTailBytes: NonNegativeInt
|
|
4895
|
+
});
|
|
4896
|
+
const DiagnosticsSnapshot = effect.Schema.Struct({
|
|
4897
|
+
generatedAt: IsoDateTime,
|
|
4898
|
+
serverStartedAt: IsoDateTime,
|
|
4899
|
+
uptimeMs: NonNegativeInt,
|
|
4900
|
+
limits: DiagnosticsLimits,
|
|
4901
|
+
observability: DiagnosticsObservability,
|
|
4902
|
+
resources: DiagnosticsResources,
|
|
4903
|
+
liveProcesses: DiagnosticsLiveProcesses,
|
|
4904
|
+
tracing: DiagnosticsTracing,
|
|
4905
|
+
failures: DiagnosticsFailures,
|
|
4906
|
+
client: DiagnosticsClient,
|
|
4907
|
+
warnings: effect.Schema.Array(DiagnosticsWarning)
|
|
4908
|
+
});
|
|
4909
|
+
var DiagnosticsError = class extends effect.Schema.TaggedErrorClass()("DiagnosticsError", {
|
|
4910
|
+
operation: TrimmedNonEmptyString,
|
|
4911
|
+
detail: TrimmedNonEmptyString,
|
|
4912
|
+
cause: effect.Schema.optional(effect.Schema.Defect)
|
|
4913
|
+
}) {
|
|
4914
|
+
get message() {
|
|
4915
|
+
return `Diagnostics ${this.operation} failed: ${this.detail}`;
|
|
4916
|
+
}
|
|
4917
|
+
};
|
|
4918
|
+
//#endregion
|
|
4919
|
+
//#region ../../packages/contracts/src/statistics.ts
|
|
4920
|
+
/**
|
|
4921
|
+
* Usage statistics surfaced in Settings → Statistics.
|
|
4922
|
+
*
|
|
4923
|
+
* The server returns the finest sensible granularity — one bucket per
|
|
4924
|
+
* `(date, project, model)` — and the client pivots/filters those buckets into
|
|
4925
|
+
* every chart (totals, per-model, per-project, time series) without re-fetching.
|
|
4926
|
+
* Token counts and timings are derived on demand from the existing projection
|
|
4927
|
+
* tables; no dedicated statistics tables exist.
|
|
4928
|
+
*/
|
|
4929
|
+
/** Selectable time window for the dashboard (client-side slicing of buckets). */
|
|
4930
|
+
const StatisticsRange = effect.Schema.Literals([
|
|
4931
|
+
"7d",
|
|
4932
|
+
"30d",
|
|
4933
|
+
"90d",
|
|
4934
|
+
"all"
|
|
4935
|
+
]);
|
|
4936
|
+
effect.Schema.Struct({
|
|
4937
|
+
projectId: effect.Schema.optional(effect.Schema.NullOr(ProjectId)),
|
|
4938
|
+
model: effect.Schema.optional(effect.Schema.NullOr(effect.Schema.String)),
|
|
4939
|
+
provider: effect.Schema.optional(effect.Schema.NullOr(effect.Schema.String)),
|
|
4940
|
+
range: effect.Schema.optional(StatisticsRange)
|
|
4941
|
+
});
|
|
4942
|
+
/**
|
|
4943
|
+
* A model that appears in the data, with its best-effort provider driver kind.
|
|
4944
|
+
* String fields are plain `Schema.String` (not non-empty): these are
|
|
4945
|
+
* server-derived display values, and relaxing them keeps a stray empty/legacy
|
|
4946
|
+
* value from failing success-encoding and crashing the whole RPC.
|
|
4947
|
+
*/
|
|
4948
|
+
const StatisticsModelRef = effect.Schema.Struct({
|
|
4949
|
+
model: effect.Schema.String,
|
|
4950
|
+
provider: effect.Schema.optional(effect.Schema.String)
|
|
4951
|
+
});
|
|
4952
|
+
const StatisticsProjectRef = effect.Schema.Struct({
|
|
4953
|
+
id: ProjectId,
|
|
4954
|
+
title: effect.Schema.String
|
|
4955
|
+
});
|
|
4956
|
+
/**
|
|
4957
|
+
* One row per `(date, project, model)`. Numeric fields are plain numbers (sums)
|
|
4958
|
+
* to stay permissive — a provider that reports fractional usage will not fail
|
|
4959
|
+
* decoding.
|
|
4960
|
+
*/
|
|
4961
|
+
const StatisticsDailyBucket = effect.Schema.Struct({
|
|
4962
|
+
/** Calendar day in UTC, formatted YYYY-MM-DD. */
|
|
4963
|
+
date: effect.Schema.String,
|
|
4964
|
+
projectId: ProjectId,
|
|
4965
|
+
model: effect.Schema.String,
|
|
4966
|
+
provider: effect.Schema.optional(effect.Schema.String),
|
|
4967
|
+
inputTokens: effect.Schema.Number,
|
|
4968
|
+
outputTokens: effect.Schema.Number,
|
|
4969
|
+
cachedInputTokens: effect.Schema.Number,
|
|
4970
|
+
reasoningTokens: effect.Schema.Number,
|
|
4971
|
+
turns: effect.Schema.Number,
|
|
4972
|
+
activeMs: effect.Schema.Number,
|
|
4973
|
+
toolUses: effect.Schema.Number,
|
|
4974
|
+
filesChanged: effect.Schema.Number,
|
|
4975
|
+
additions: effect.Schema.Number,
|
|
4976
|
+
deletions: effect.Schema.Number,
|
|
4977
|
+
commits: effect.Schema.Number,
|
|
4978
|
+
pushes: effect.Schema.Number,
|
|
4979
|
+
threadsCreated: effect.Schema.Number
|
|
4980
|
+
});
|
|
4981
|
+
const StatisticsWorktreeSummary = effect.Schema.Struct({
|
|
4982
|
+
created: effect.Schema.Number,
|
|
4983
|
+
archived: effect.Schema.Number,
|
|
4984
|
+
active: effect.Schema.Number,
|
|
4985
|
+
openPrs: effect.Schema.Number
|
|
4986
|
+
});
|
|
4987
|
+
const StatisticsTotals = effect.Schema.Struct({
|
|
4988
|
+
inputTokens: effect.Schema.Number,
|
|
4989
|
+
outputTokens: effect.Schema.Number,
|
|
4990
|
+
cachedInputTokens: effect.Schema.Number,
|
|
4991
|
+
reasoningTokens: effect.Schema.Number,
|
|
4992
|
+
totalTokens: effect.Schema.Number,
|
|
4993
|
+
turns: effect.Schema.Number,
|
|
4994
|
+
activeMs: effect.Schema.Number,
|
|
4995
|
+
toolUses: effect.Schema.Number,
|
|
4996
|
+
filesChanged: effect.Schema.Number,
|
|
4997
|
+
additions: effect.Schema.Number,
|
|
4998
|
+
deletions: effect.Schema.Number,
|
|
4999
|
+
commits: effect.Schema.Number,
|
|
5000
|
+
pushes: effect.Schema.Number,
|
|
5001
|
+
threads: effect.Schema.Number,
|
|
5002
|
+
projects: effect.Schema.Number
|
|
5003
|
+
});
|
|
5004
|
+
/**
|
|
5005
|
+
* How per-day/per-model token figures were attributed:
|
|
5006
|
+
* - `per-turn-delta`: exact, one definitive delta per (thread, turn).
|
|
5007
|
+
* - `thread-cumulative`: approximate, a thread's cumulative total attributed to
|
|
5008
|
+
* its primary model and last-activity day (fallback when deltas are absent).
|
|
5009
|
+
*/
|
|
5010
|
+
const StatisticsTokenAttribution = effect.Schema.Literals(["per-turn-delta", "thread-cumulative"]);
|
|
5011
|
+
const StatisticsSnapshot = effect.Schema.Struct({
|
|
5012
|
+
generatedAt: IsoDateTime,
|
|
5013
|
+
/** Earliest activity date observed, useful for the "all time" label. */
|
|
5014
|
+
earliestActivityAt: effect.Schema.optional(IsoDateTime),
|
|
5015
|
+
projects: effect.Schema.Array(StatisticsProjectRef),
|
|
5016
|
+
models: effect.Schema.Array(StatisticsModelRef),
|
|
5017
|
+
dailyBuckets: effect.Schema.Array(StatisticsDailyBucket),
|
|
5018
|
+
worktrees: StatisticsWorktreeSummary,
|
|
5019
|
+
totals: StatisticsTotals,
|
|
5020
|
+
tokenAttribution: effect.Schema.optional(StatisticsTokenAttribution)
|
|
5021
|
+
});
|
|
5022
|
+
//#endregion
|
|
4630
5023
|
//#region ../../packages/contracts/src/opinionatedPlugins.ts
|
|
4631
5024
|
const OpinionatedPluginId = effect.Schema.Literals([
|
|
4632
5025
|
"rtk",
|
|
@@ -5015,6 +5408,16 @@ const VcsStatusChangeRequest = effect.Schema.Struct({
|
|
|
5015
5408
|
headRef: TrimmedNonEmptyStringSchema,
|
|
5016
5409
|
state: VcsStatusChangeRequestState
|
|
5017
5410
|
});
|
|
5411
|
+
/** A per-file diff summary plus its rolled-up insertion/deletion totals. */
|
|
5412
|
+
const VcsStatusDiffTotals = effect.Schema.Struct({
|
|
5413
|
+
files: effect.Schema.Array(effect.Schema.Struct({
|
|
5414
|
+
path: TrimmedNonEmptyStringSchema,
|
|
5415
|
+
insertions: NonNegativeInt,
|
|
5416
|
+
deletions: NonNegativeInt
|
|
5417
|
+
})),
|
|
5418
|
+
insertions: NonNegativeInt,
|
|
5419
|
+
deletions: NonNegativeInt
|
|
5420
|
+
});
|
|
5018
5421
|
const VcsStatusLocalShape = {
|
|
5019
5422
|
isRepo: effect.Schema.Boolean,
|
|
5020
5423
|
sourceControlProvider: effect.Schema.optional(SourceControlProviderInfo),
|
|
@@ -5022,15 +5425,15 @@ const VcsStatusLocalShape = {
|
|
|
5022
5425
|
isDefaultRef: effect.Schema.Boolean,
|
|
5023
5426
|
refName: effect.Schema.NullOr(TrimmedNonEmptyStringSchema),
|
|
5024
5427
|
hasWorkingTreeChanges: effect.Schema.Boolean,
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5428
|
+
/** Uncommitted (staged + unstaged) working-tree changes. */
|
|
5429
|
+
workingTree: VcsStatusDiffTotals,
|
|
5430
|
+
/**
|
|
5431
|
+
* Committed changes on this branch relative to its base (merge-base of the
|
|
5432
|
+
* default branch and HEAD, i.e. `git diff base...HEAD` — the same set a PR
|
|
5433
|
+
* shows). Counts committed work whether or not it has been pushed. Omitted on
|
|
5434
|
+
* the default branch (nothing to compare against) and by non-git drivers.
|
|
5435
|
+
*/
|
|
5436
|
+
committed: effect.Schema.optional(VcsStatusDiffTotals)
|
|
5034
5437
|
};
|
|
5035
5438
|
const VcsStatusRemoteShape = {
|
|
5036
5439
|
hasUpstream: effect.Schema.Boolean,
|
|
@@ -5447,6 +5850,8 @@ const WS_METHODS = {
|
|
|
5447
5850
|
terminalRestart: "terminal.restart",
|
|
5448
5851
|
terminalClose: "terminal.close",
|
|
5449
5852
|
serverGetConfig: "server.getConfig",
|
|
5853
|
+
serverGetAdvertisedEndpoints: "server.getAdvertisedEndpoints",
|
|
5854
|
+
serverGetDiagnosticsMetrics: "server.getDiagnosticsMetrics",
|
|
5450
5855
|
serverRefreshProviders: "server.refreshProviders",
|
|
5451
5856
|
serverUpdateProvider: "server.updateProvider",
|
|
5452
5857
|
serverUpsertKeybinding: "server.upsertKeybinding",
|
|
@@ -5457,6 +5862,8 @@ const WS_METHODS = {
|
|
|
5457
5862
|
serverListOpinionatedPlugins: "server.listOpinionatedPlugins",
|
|
5458
5863
|
serverCheckOpinionatedPlugins: "server.checkOpinionatedPlugins",
|
|
5459
5864
|
serverInstallOpinionatedPlugin: "server.installOpinionatedPlugin",
|
|
5865
|
+
serverGetDiagnosticsSnapshot: "server.getDiagnosticsSnapshot",
|
|
5866
|
+
serverGetStatistics: "server.getStatistics",
|
|
5460
5867
|
mcpListWorkspaces: "mcp.listWorkspaces",
|
|
5461
5868
|
mcpListServers: "mcp.listServers",
|
|
5462
5869
|
mcpUpsertServer: "mcp.upsertServer",
|
|
@@ -5594,6 +6001,16 @@ const WsServerGetConfigRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.serverGetCo
|
|
|
5594
6001
|
success: ServerConfig,
|
|
5595
6002
|
error: effect.Schema.Union([KeybindingsConfigError, ServerSettingsError])
|
|
5596
6003
|
});
|
|
6004
|
+
const WsServerGetAdvertisedEndpointsRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.serverGetAdvertisedEndpoints, {
|
|
6005
|
+
payload: effect.Schema.Struct({}),
|
|
6006
|
+
success: effect.Schema.Array(AdvertisedEndpoint),
|
|
6007
|
+
error: AuthRpcError
|
|
6008
|
+
});
|
|
6009
|
+
const WsServerGetDiagnosticsMetricsRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.serverGetDiagnosticsMetrics, {
|
|
6010
|
+
payload: effect.Schema.Struct({}),
|
|
6011
|
+
success: ServerLocalDiagnosticsMetrics,
|
|
6012
|
+
error: effect.Schema.Never
|
|
6013
|
+
});
|
|
5597
6014
|
const WsServerRefreshProvidersRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.serverRefreshProviders, {
|
|
5598
6015
|
payload: effect.Schema.Struct({
|
|
5599
6016
|
/**
|
|
@@ -5621,6 +6038,16 @@ const WsServerUpdateSettingsRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.server
|
|
|
5621
6038
|
success: ServerSettings,
|
|
5622
6039
|
error: effect.Schema.Union([ServerSettingsError, AuthRpcError])
|
|
5623
6040
|
});
|
|
6041
|
+
const WsServerGetDiagnosticsSnapshotRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.serverGetDiagnosticsSnapshot, {
|
|
6042
|
+
payload: effect.Schema.Struct({}),
|
|
6043
|
+
success: DiagnosticsSnapshot,
|
|
6044
|
+
error: effect.Schema.Union([DiagnosticsError, AuthRpcError])
|
|
6045
|
+
});
|
|
6046
|
+
const WsServerGetStatisticsRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.serverGetStatistics, {
|
|
6047
|
+
payload: effect.Schema.Struct({}),
|
|
6048
|
+
success: StatisticsSnapshot,
|
|
6049
|
+
error: AuthRpcError
|
|
6050
|
+
});
|
|
5624
6051
|
const WsServerDiscoverSourceControlRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.serverDiscoverSourceControl, {
|
|
5625
6052
|
payload: effect.Schema.Struct({}),
|
|
5626
6053
|
success: SourceControlDiscoveryResult,
|
|
@@ -5740,7 +6167,7 @@ const WsSourceControlListChangeRequestsRpc = effect_unstable_rpc_Rpc.make(WS_MET
|
|
|
5740
6167
|
query: effect.Schema.optional(effect.Schema.String)
|
|
5741
6168
|
}),
|
|
5742
6169
|
success: effect.Schema.Array(ChangeRequest),
|
|
5743
|
-
error: SourceControlProviderError
|
|
6170
|
+
error: effect.Schema.Union([SourceControlProviderError, AuthRpcError])
|
|
5744
6171
|
});
|
|
5745
6172
|
const WsSourceControlSearchChangeRequestsRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.sourceControlSearchChangeRequests, {
|
|
5746
6173
|
payload: effect.Schema.Struct({
|
|
@@ -6152,7 +6579,52 @@ const WsSubscribeAuthAccessRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.subscri
|
|
|
6152
6579
|
error: AuthRpcError,
|
|
6153
6580
|
stream: true
|
|
6154
6581
|
});
|
|
6155
|
-
const WsRpcGroup = effect_unstable_rpc_RpcGroup.make(WsServerGetConfigRpc, WsServerRefreshProvidersRpc, WsServerUpdateProviderRpc, WsServerUpsertKeybindingRpc, WsKeybindingsReplaceCustomRpc, WsServerGetSettingsRpc, WsServerUpdateSettingsRpc, WsServerDiscoverSourceControlRpc, WsServerListOpinionatedPluginsRpc, WsServerCheckOpinionatedPluginsRpc, WsServerInstallOpinionatedPluginRpc, WsMcpListWorkspacesRpc, WsMcpListServersRpc, WsMcpUpsertServerRpc, WsMcpSetServerEnabledRpc, WsMcpRemoveServerRpc, WsMcpReloadServersRpc, WsMcpStartOauthLoginRpc, WsSourceControlLookupRepositoryRpc, WsSourceControlSearchRepositoriesRpc, WsSourceControlCloneRepositoryRpc, WsSourceControlPublishRepositoryRpc, WsSourceControlListIssuesRpc, WsSourceControlGetIssueRpc, WsSourceControlSearchIssuesRpc, WsSourceControlListChangeRequestsRpc, WsSourceControlSearchChangeRequestsRpc, WsSourceControlGetChangeRequestDetailRpc, WsSourceControlGetChangeRequestDiffRpc, WsSourceControlCreateIssueRpc, WsSourceControlAddIssueCommentRpc, WsSourceControlAddIssueCommentReactionRpc, WsSourceControlAddChangeRequestCommentRpc, WsSourceControlAddChangeRequestCommentReactionRpc, WsSourceControlListIssueLabelsRpc, WsSourceControlListIssueAssigneesRpc, WsSourceControlListWorkflowRunsRpc, WsSourceControlGetWorkflowRunJobsRpc, WsSourceControlGetWorkflowJobLogRpc, WsSourceControlRerunWorkflowRpc, WsTextGenerationGenerateIssueContentRpc, WsTextGenerationGenerateBranchNameRpc, WsAtlassianListConnectionsRpc, WsAtlassianStartOAuthRpc, WsAtlassianDisconnectRpc, WsAtlassianRefreshRpc, WsAtlassianListResourcesRpc, WsAtlassianGetProjectLinkRpc, WsAtlassianSaveProjectLinkRpc, WsAtlassianSaveManualBitbucketTokenRpc, WsAtlassianSaveManualJiraTokenRpc, WsWorkItemsListProjectsRpc, WsWorkItemsListRpc, WsWorkItemsSearchRpc, WsWorkItemsGetRpc, WsWorkItemsAddCommentRpc, WsWorkItemsEditCommentRpc, WsWorkItemsUpdateRpc, WsWorkItemsListTransitionsRpc, WsWorkItemsTransitionRpc, WsProjectsListEntriesRpc, WsProjectsSearchEntriesRpc, WsProjectsReadFileRpc, WsProjectsWriteFileRpc, WsProjectsStageFileReferenceRpc, WsShellOpenInEditorRpc, WsFilesystemBrowseRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsGitCreateWorktreeForProjectRpc, WsGitFindWorktreeForOriginRpc, WsGitArchiveWorktreeRpc, WsGitRestoreWorktreeRpc, WsGitDeleteWorktreeRpc, WsThreadsSetManualBucketRpc, WsThreadsSetManualPositionRpc, WsWorktreesSetManualPositionRpc, WsProjectsInitializeGitRpc, WsVcsListRefsRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsTerminalOpenRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsSubscribeTerminalEventsRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationReplayEventsRpc, WsOrchestrationReplayEventsPageRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc);
|
|
6582
|
+
const WsRpcGroup = effect_unstable_rpc_RpcGroup.make(WsServerGetConfigRpc, WsServerGetAdvertisedEndpointsRpc, WsServerGetDiagnosticsMetricsRpc, WsServerGetStatisticsRpc, WsServerRefreshProvidersRpc, WsServerUpdateProviderRpc, WsServerUpsertKeybindingRpc, WsKeybindingsReplaceCustomRpc, WsServerGetSettingsRpc, WsServerUpdateSettingsRpc, WsServerGetDiagnosticsSnapshotRpc, WsServerDiscoverSourceControlRpc, WsServerListOpinionatedPluginsRpc, WsServerCheckOpinionatedPluginsRpc, WsServerInstallOpinionatedPluginRpc, WsMcpListWorkspacesRpc, WsMcpListServersRpc, WsMcpUpsertServerRpc, WsMcpSetServerEnabledRpc, WsMcpRemoveServerRpc, WsMcpReloadServersRpc, WsMcpStartOauthLoginRpc, WsSourceControlLookupRepositoryRpc, WsSourceControlSearchRepositoriesRpc, WsSourceControlCloneRepositoryRpc, WsSourceControlPublishRepositoryRpc, WsSourceControlListIssuesRpc, WsSourceControlGetIssueRpc, WsSourceControlSearchIssuesRpc, WsSourceControlListChangeRequestsRpc, WsSourceControlSearchChangeRequestsRpc, WsSourceControlGetChangeRequestDetailRpc, WsSourceControlGetChangeRequestDiffRpc, WsSourceControlCreateIssueRpc, WsSourceControlAddIssueCommentRpc, WsSourceControlAddIssueCommentReactionRpc, WsSourceControlAddChangeRequestCommentRpc, WsSourceControlAddChangeRequestCommentReactionRpc, WsSourceControlListIssueLabelsRpc, WsSourceControlListIssueAssigneesRpc, WsSourceControlListWorkflowRunsRpc, WsSourceControlGetWorkflowRunJobsRpc, WsSourceControlGetWorkflowJobLogRpc, WsSourceControlRerunWorkflowRpc, WsTextGenerationGenerateIssueContentRpc, WsTextGenerationGenerateBranchNameRpc, WsAtlassianListConnectionsRpc, WsAtlassianStartOAuthRpc, WsAtlassianDisconnectRpc, WsAtlassianRefreshRpc, WsAtlassianListResourcesRpc, WsAtlassianGetProjectLinkRpc, WsAtlassianSaveProjectLinkRpc, WsAtlassianSaveManualBitbucketTokenRpc, WsAtlassianSaveManualJiraTokenRpc, WsWorkItemsListProjectsRpc, WsWorkItemsListRpc, WsWorkItemsSearchRpc, WsWorkItemsGetRpc, WsWorkItemsAddCommentRpc, WsWorkItemsEditCommentRpc, WsWorkItemsUpdateRpc, WsWorkItemsListTransitionsRpc, WsWorkItemsTransitionRpc, WsProjectsListEntriesRpc, WsProjectsSearchEntriesRpc, WsProjectsReadFileRpc, WsProjectsWriteFileRpc, WsProjectsStageFileReferenceRpc, WsShellOpenInEditorRpc, WsFilesystemBrowseRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsGitCreateWorktreeForProjectRpc, WsGitFindWorktreeForOriginRpc, WsGitArchiveWorktreeRpc, WsGitRestoreWorktreeRpc, WsGitDeleteWorktreeRpc, WsThreadsSetManualBucketRpc, WsThreadsSetManualPositionRpc, WsWorktreesSetManualPositionRpc, WsProjectsInitializeGitRpc, WsVcsListRefsRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsTerminalOpenRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsSubscribeTerminalEventsRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationReplayEventsRpc, WsOrchestrationReplayEventsPageRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc);
|
|
6583
|
+
//#endregion
|
|
6584
|
+
//#region ../../packages/shared/src/schemaJson.ts
|
|
6585
|
+
const decodeJsonResult = (schema) => {
|
|
6586
|
+
const decode = effect.Schema.decodeExit(effect.Schema.fromJsonString(schema));
|
|
6587
|
+
return (input) => {
|
|
6588
|
+
const result = decode(input);
|
|
6589
|
+
if (effect.Exit.isFailure(result)) return effect.Result.fail(result.cause);
|
|
6590
|
+
return effect.Result.succeed(result.value);
|
|
6591
|
+
};
|
|
6592
|
+
};
|
|
6593
|
+
const formatSchemaError = (cause) => {
|
|
6594
|
+
const squashed = effect.Cause.squash(cause);
|
|
6595
|
+
return effect.Schema.isSchemaError(squashed) ? effect.SchemaIssue.makeFormatterDefault()(squashed.issue) : effect.Cause.pretty(cause);
|
|
6596
|
+
};
|
|
6597
|
+
/**
|
|
6598
|
+
* A `Getter` that parses a lenient JSON string (tolerating trailing commas
|
|
6599
|
+
* and JS-style comments) into an unknown value.
|
|
6600
|
+
*
|
|
6601
|
+
* Mirrors `SchemaGetter.parseJson()` but uses `parseLenientJson` instead
|
|
6602
|
+
* of `JSON.parse`.
|
|
6603
|
+
*/
|
|
6604
|
+
const parseLenientJsonGetter = effect.SchemaGetter.onSome((input) => effect.Effect.try({
|
|
6605
|
+
try: () => {
|
|
6606
|
+
let stripped = input.replace(/("(?:[^"\\]|\\.)*")|\/\/[^\n]*/g, (match, stringLiteral) => stringLiteral ? match : "");
|
|
6607
|
+
stripped = stripped.replace(/("(?:[^"\\]|\\.)*")|\/\*[\s\S]*?\*\//g, (match, stringLiteral) => stringLiteral ? match : "");
|
|
6608
|
+
stripped = stripped.replace(/,(\s*[}\]])/g, "$1");
|
|
6609
|
+
return effect.Option.some(JSON.parse(stripped));
|
|
6610
|
+
},
|
|
6611
|
+
catch: (e) => new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message: String(e) })
|
|
6612
|
+
}));
|
|
6613
|
+
/**
|
|
6614
|
+
* Schema transformation: lenient JSONC string ↔ unknown.
|
|
6615
|
+
*
|
|
6616
|
+
* Same API as `SchemaTransformation.fromJsonString`, but the decode side
|
|
6617
|
+
* strips trailing commas and JS-style comments before parsing.
|
|
6618
|
+
* Encoding produces strict JSON via `JSON.stringify`.
|
|
6619
|
+
*/
|
|
6620
|
+
const fromLenientJsonString = new effect.SchemaTransformation.Transformation(parseLenientJsonGetter, effect.SchemaGetter.stringifyJson());
|
|
6621
|
+
/**
|
|
6622
|
+
* Build a schema that decodes a lenient JSON string into `A`.
|
|
6623
|
+
*
|
|
6624
|
+
* Drop-in replacement for `Schema.fromJsonString(schema)` that tolerates
|
|
6625
|
+
* trailing commas and comments in the input.
|
|
6626
|
+
*/
|
|
6627
|
+
const fromLenientJson = (schema) => effect.Schema.String.pipe(effect.Schema.decodeTo(schema, fromLenientJsonString));
|
|
6156
6628
|
//#endregion
|
|
6157
6629
|
//#region src/stream/collectUint8StreamText.ts
|
|
6158
6630
|
const collectUint8StreamText = (input) => {
|
|
@@ -6907,6 +7379,12 @@ Object.defineProperty(exports, "RuntimeRequestId", {
|
|
|
6907
7379
|
return RuntimeRequestId;
|
|
6908
7380
|
}
|
|
6909
7381
|
});
|
|
7382
|
+
Object.defineProperty(exports, "RuntimeSubagentId", {
|
|
7383
|
+
enumerable: true,
|
|
7384
|
+
get: function() {
|
|
7385
|
+
return RuntimeSubagentId;
|
|
7386
|
+
}
|
|
7387
|
+
});
|
|
6910
7388
|
Object.defineProperty(exports, "RuntimeTaskId", {
|
|
6911
7389
|
enumerable: true,
|
|
6912
7390
|
get: function() {
|
|
@@ -7243,12 +7721,30 @@ Object.defineProperty(exports, "collectUint8StreamText", {
|
|
|
7243
7721
|
return collectUint8StreamText;
|
|
7244
7722
|
}
|
|
7245
7723
|
});
|
|
7724
|
+
Object.defineProperty(exports, "decodeJsonResult", {
|
|
7725
|
+
enumerable: true,
|
|
7726
|
+
get: function() {
|
|
7727
|
+
return decodeJsonResult;
|
|
7728
|
+
}
|
|
7729
|
+
});
|
|
7246
7730
|
Object.defineProperty(exports, "defaultInstanceIdForDriver", {
|
|
7247
7731
|
enumerable: true,
|
|
7248
7732
|
get: function() {
|
|
7249
7733
|
return defaultInstanceIdForDriver;
|
|
7250
7734
|
}
|
|
7251
7735
|
});
|
|
7736
|
+
Object.defineProperty(exports, "formatSchemaError", {
|
|
7737
|
+
enumerable: true,
|
|
7738
|
+
get: function() {
|
|
7739
|
+
return formatSchemaError;
|
|
7740
|
+
}
|
|
7741
|
+
});
|
|
7742
|
+
Object.defineProperty(exports, "fromLenientJson", {
|
|
7743
|
+
enumerable: true,
|
|
7744
|
+
get: function() {
|
|
7745
|
+
return fromLenientJson;
|
|
7746
|
+
}
|
|
7747
|
+
});
|
|
7252
7748
|
Object.defineProperty(exports, "isProviderDriverKind", {
|
|
7253
7749
|
enumerable: true,
|
|
7254
7750
|
get: function() {
|