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
package/dist/{GitLabSourceControlProvider-BdMCIjXb.mjs → GitLabSourceControlProvider-DePct78W.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { En as SourceControlProviderError, On as truncateSourceControlDetailContent } from "./collectUint8StreamText-Lv4GGI79.mjs";
|
|
4
|
+
import { l as sourceControlRefFromInput, o as SourceControlProvider, r as gitlabDiscovery } from "./SourceControlProviderDiscoveryCatalog-mJV_Xitr.mjs";
|
|
5
|
+
import { Bt as GitLabCli } from "./bin.mjs";
|
|
6
6
|
import { DateTime, Effect, Layer, Option } from "effect";
|
|
7
7
|
//#region src/sourceControl/GitLabSourceControlProvider.ts
|
|
8
8
|
function providerError(operation, cause) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { n as detectSourceControlProviderFromRemoteUrl } from "./sourceControl-iWG-m4wE.mjs";
|
|
4
4
|
import * as Effect$1 from "effect/Effect";
|
|
5
|
-
import { Cause, Context, Duration, Effect, Exit, FileSystem, Layer, Metric, Path, Schema } from "effect";
|
|
5
|
+
import { Cause, Context, DateTime, Duration, Effect, Exit, FileSystem, Layer, Metric, Path, Schema } from "effect";
|
|
6
6
|
import { dual } from "effect/Function";
|
|
7
7
|
import * as Random$1 from "effect/Random";
|
|
8
8
|
//#region src/config.ts
|
|
@@ -270,6 +270,90 @@ function mergeGitStatusParts(local, remote) {
|
|
|
270
270
|
...remote ?? EMPTY_GIT_STATUS_REMOTE
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
+
const DEFAULT_ROLLING_WINDOW_MS = 300 * 1e3;
|
|
274
|
+
var RollingDurationWindow = class {
|
|
275
|
+
maxSamples;
|
|
276
|
+
maxWindowMs;
|
|
277
|
+
now;
|
|
278
|
+
samples = [];
|
|
279
|
+
constructor(options = {}) {
|
|
280
|
+
this.maxSamples = Math.max(1, options.maxSamples ?? 256);
|
|
281
|
+
this.maxWindowMs = Math.max(1, options.maxWindowMs ?? 3e5);
|
|
282
|
+
this.now = options.now ?? (() => Date.now());
|
|
283
|
+
}
|
|
284
|
+
record(durationMs, recordedAt = this.now()) {
|
|
285
|
+
if (!Number.isFinite(durationMs) || durationMs < 0) return;
|
|
286
|
+
this.evictExpired(recordedAt);
|
|
287
|
+
this.samples.push({
|
|
288
|
+
recordedAt,
|
|
289
|
+
durationMs
|
|
290
|
+
});
|
|
291
|
+
if (this.samples.length > this.maxSamples) this.samples = this.samples.slice(this.samples.length - this.maxSamples);
|
|
292
|
+
}
|
|
293
|
+
count() {
|
|
294
|
+
this.evictExpired();
|
|
295
|
+
return this.samples.length;
|
|
296
|
+
}
|
|
297
|
+
average() {
|
|
298
|
+
this.evictExpired();
|
|
299
|
+
if (this.samples.length === 0) return null;
|
|
300
|
+
return this.samples.reduce((sum, sample) => sum + sample.durationMs, 0) / this.samples.length;
|
|
301
|
+
}
|
|
302
|
+
percentile(percent) {
|
|
303
|
+
this.evictExpired();
|
|
304
|
+
if (this.samples.length === 0) return null;
|
|
305
|
+
const normalizedPercent = Math.min(100, Math.max(0, percent));
|
|
306
|
+
const sorted = this.samples.map((sample) => sample.durationMs).toSorted((left, right) => left - right);
|
|
307
|
+
const index = Math.ceil(normalizedPercent / 100 * sorted.length) - 1;
|
|
308
|
+
return sorted[Math.max(0, Math.min(sorted.length - 1, index))] ?? null;
|
|
309
|
+
}
|
|
310
|
+
evictExpired(now = this.now()) {
|
|
311
|
+
const cutoff = now - this.maxWindowMs;
|
|
312
|
+
if (this.samples.length === 0) return;
|
|
313
|
+
let firstValidIndex = 0;
|
|
314
|
+
while (firstValidIndex < this.samples.length && this.samples[firstValidIndex].recordedAt < cutoff) firstValidIndex += 1;
|
|
315
|
+
if (firstValidIndex > 0) this.samples = this.samples.slice(firstValidIndex);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/observability/Services/LocalDiagnosticsMetrics.ts
|
|
320
|
+
var LocalDiagnosticsMetrics = class extends Context.Service()("ryco/observability/Services/LocalDiagnosticsMetrics") {};
|
|
321
|
+
const makeLocalDiagnosticsMetrics = Effect.sync(() => {
|
|
322
|
+
const turnQuiescenceWindow = new RollingDurationWindow({
|
|
323
|
+
maxSamples: 256,
|
|
324
|
+
maxWindowMs: DEFAULT_ROLLING_WINDOW_MS
|
|
325
|
+
});
|
|
326
|
+
const checkpointDurationWindow = new RollingDurationWindow({
|
|
327
|
+
maxSamples: 256,
|
|
328
|
+
maxWindowMs: DEFAULT_ROLLING_WINDOW_MS
|
|
329
|
+
});
|
|
330
|
+
let wsReconnectCount = 0;
|
|
331
|
+
return {
|
|
332
|
+
recordTurnQuiescenceMs: (durationMs) => Effect.sync(() => {
|
|
333
|
+
turnQuiescenceWindow.record(durationMs);
|
|
334
|
+
}),
|
|
335
|
+
recordCheckpointDurationMs: (durationMs) => Effect.sync(() => {
|
|
336
|
+
checkpointDurationWindow.record(durationMs);
|
|
337
|
+
}),
|
|
338
|
+
recordWsReconnect: () => Effect.sync(() => {
|
|
339
|
+
wsReconnectCount += 1;
|
|
340
|
+
}),
|
|
341
|
+
snapshot: Effect.gen(function* () {
|
|
342
|
+
const capturedAt = yield* DateTime.now;
|
|
343
|
+
return {
|
|
344
|
+
turnQuiescenceAvgMs: turnQuiescenceWindow.average(),
|
|
345
|
+
checkpointDurationP95Ms: checkpointDurationWindow.percentile(95),
|
|
346
|
+
wsReconnectCount,
|
|
347
|
+
windowSampleCounts: {
|
|
348
|
+
turnQuiescence: turnQuiescenceWindow.count(),
|
|
349
|
+
checkpointDuration: checkpointDurationWindow.count()
|
|
350
|
+
},
|
|
351
|
+
capturedAt: DateTime.formatIso(capturedAt)
|
|
352
|
+
};
|
|
353
|
+
})
|
|
354
|
+
};
|
|
355
|
+
});
|
|
356
|
+
const LocalDiagnosticsMetricsLive = Layer.effect(LocalDiagnosticsMetrics, makeLocalDiagnosticsMetrics);
|
|
273
357
|
//#endregion
|
|
274
358
|
//#region src/observability/Metrics.ts
|
|
275
359
|
const metricNames = {
|
|
@@ -284,6 +368,10 @@ const metricNames = {
|
|
|
284
368
|
providerTurnDuration: "ryco_provider_turn_duration",
|
|
285
369
|
providerRuntimeEventsTotal: "ryco_provider_runtime_events_total",
|
|
286
370
|
providerEventLogRecordsDroppedTotal: "ryco_provider_event_log_records_dropped_total",
|
|
371
|
+
runtimeQueueEnqueuesTotal: "ryco_runtime_queue_enqueues_total",
|
|
372
|
+
runtimeQueueDequeuesTotal: "ryco_runtime_queue_dequeues_total",
|
|
373
|
+
runtimeQueueDepth: "ryco_runtime_queue_depth",
|
|
374
|
+
runtimeQueueHighWater: "ryco_runtime_queue_high_water",
|
|
287
375
|
startupCommandGateEnqueuesTotal: "ryco_startup_command_gate_enqueues_total",
|
|
288
376
|
startupCommandGateQueueDepth: "ryco_startup_command_gate_queue_depth",
|
|
289
377
|
startupCommandGateQueueHighWater: "ryco_startup_command_gate_queue_high_water",
|
|
@@ -308,6 +396,10 @@ const providerTurnsTotal = Metric.counter(metricNames.providerTurnsTotal, { desc
|
|
|
308
396
|
const providerTurnDuration = Metric.timer(metricNames.providerTurnDuration, { description: "Provider turn request duration." });
|
|
309
397
|
const providerRuntimeEventsTotal = Metric.counter(metricNames.providerRuntimeEventsTotal, { description: "Total canonical provider runtime events processed." });
|
|
310
398
|
const providerEventLogRecordsDroppedTotal = Metric.counter(metricNames.providerEventLogRecordsDroppedTotal, { description: "Total provider observability log records dropped by bounded logging queues." });
|
|
399
|
+
const runtimeQueueEnqueuesTotal = Metric.counter(metricNames.runtimeQueueEnqueuesTotal, { description: "Total runtime queue enqueue attempts by queue." });
|
|
400
|
+
const runtimeQueueDequeuesTotal = Metric.counter(metricNames.runtimeQueueDequeuesTotal, { description: "Total runtime queue dequeues by queue." });
|
|
401
|
+
const runtimeQueueDepth = Metric.gauge(metricNames.runtimeQueueDepth, { description: "Current tracked runtime queue depth." });
|
|
402
|
+
const runtimeQueueHighWater = Metric.gauge(metricNames.runtimeQueueHighWater, { description: "Highest observed tracked runtime queue depth." });
|
|
311
403
|
const startupCommandGateEnqueuesTotal = Metric.counter(metricNames.startupCommandGateEnqueuesTotal, { description: "Total startup command gate enqueue attempts by outcome." });
|
|
312
404
|
const startupCommandGateQueueDepth = Metric.gauge(metricNames.startupCommandGateQueueDepth, { description: "Current number of commands waiting for startup command readiness." });
|
|
313
405
|
const startupCommandGateQueueHighWater = Metric.gauge(metricNames.startupCommandGateQueueHighWater, { description: "Highest observed startup command gate queue depth." });
|
|
@@ -353,4 +445,4 @@ const providerTurnMetricAttributes = (input) => {
|
|
|
353
445
|
});
|
|
354
446
|
};
|
|
355
447
|
//#endregion
|
|
356
|
-
export {
|
|
448
|
+
export { terminalRestartsTotal as A, mergeGitStatusParts as B, runtimeQueueDequeuesTotal as C, startupCommandGateQueueDepth as D, startupCommandGateEnqueuesTotal as E, WORKTREE_BRANCH_PREFIX as F, compactTraceAttributes as G, resolveAutoFeatureBranchName as H, buildTemporaryWorktreeBranchName as I, RuntimeMode as J, outcomeFromExit as K, dedupeRemoteBranchesWithLocalMatches as L, withMetrics as M, LocalDiagnosticsMetrics as N, startupCommandGateQueueHighWater as O, LocalDiagnosticsMetricsLive as P, resolveStaticDir as Q, detectSourceControlProviderFromGitRemoteUrl as R, runtimeQueueDepth as S, runtimeQueueHighWater as T, sanitizeBranchFragment as U, normalizeGitRemoteUrl as V, sanitizeFeatureBranchName as W, deriveServerPaths as X, ServerConfig as Y, ensureServerDirectories as Z, providerTurnDuration as _, orchestrationCommandAckDuration as a, rpcRequestDuration as b, orchestrationEventsProcessedTotal as c, providerRuntimeEventsTotal as d, providerSessionsTotal as f, providerStartupQueueWaitDuration as g, providerStartupQueueHighWater as h, metricAttributes as i, terminalSessionsTotal as j, startupCommandGateQueueWaitDuration as k, providerEventLogRecordsDroppedTotal as l, providerStartupQueueDepth as m, gitCommandsTotal as n, orchestrationCommandDuration as o, providerStartupAdmissionTotal as p, DEFAULT_PORT as q, increment as r, orchestrationCommandsTotal as s, gitCommandDuration as t, providerMetricAttributes as u, providerTurnMetricAttributes as v, runtimeQueueEnqueuesTotal as w, rpcRequestsTotal as x, providerTurnsTotal as y, isTemporaryWorktreeBranch as z };
|
|
@@ -273,6 +273,90 @@ function mergeGitStatusParts(local, remote) {
|
|
|
273
273
|
...remote ?? EMPTY_GIT_STATUS_REMOTE
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
+
const DEFAULT_ROLLING_WINDOW_MS = 300 * 1e3;
|
|
277
|
+
var RollingDurationWindow = class {
|
|
278
|
+
maxSamples;
|
|
279
|
+
maxWindowMs;
|
|
280
|
+
now;
|
|
281
|
+
samples = [];
|
|
282
|
+
constructor(options = {}) {
|
|
283
|
+
this.maxSamples = Math.max(1, options.maxSamples ?? 256);
|
|
284
|
+
this.maxWindowMs = Math.max(1, options.maxWindowMs ?? 3e5);
|
|
285
|
+
this.now = options.now ?? (() => Date.now());
|
|
286
|
+
}
|
|
287
|
+
record(durationMs, recordedAt = this.now()) {
|
|
288
|
+
if (!Number.isFinite(durationMs) || durationMs < 0) return;
|
|
289
|
+
this.evictExpired(recordedAt);
|
|
290
|
+
this.samples.push({
|
|
291
|
+
recordedAt,
|
|
292
|
+
durationMs
|
|
293
|
+
});
|
|
294
|
+
if (this.samples.length > this.maxSamples) this.samples = this.samples.slice(this.samples.length - this.maxSamples);
|
|
295
|
+
}
|
|
296
|
+
count() {
|
|
297
|
+
this.evictExpired();
|
|
298
|
+
return this.samples.length;
|
|
299
|
+
}
|
|
300
|
+
average() {
|
|
301
|
+
this.evictExpired();
|
|
302
|
+
if (this.samples.length === 0) return null;
|
|
303
|
+
return this.samples.reduce((sum, sample) => sum + sample.durationMs, 0) / this.samples.length;
|
|
304
|
+
}
|
|
305
|
+
percentile(percent) {
|
|
306
|
+
this.evictExpired();
|
|
307
|
+
if (this.samples.length === 0) return null;
|
|
308
|
+
const normalizedPercent = Math.min(100, Math.max(0, percent));
|
|
309
|
+
const sorted = this.samples.map((sample) => sample.durationMs).toSorted((left, right) => left - right);
|
|
310
|
+
const index = Math.ceil(normalizedPercent / 100 * sorted.length) - 1;
|
|
311
|
+
return sorted[Math.max(0, Math.min(sorted.length - 1, index))] ?? null;
|
|
312
|
+
}
|
|
313
|
+
evictExpired(now = this.now()) {
|
|
314
|
+
const cutoff = now - this.maxWindowMs;
|
|
315
|
+
if (this.samples.length === 0) return;
|
|
316
|
+
let firstValidIndex = 0;
|
|
317
|
+
while (firstValidIndex < this.samples.length && this.samples[firstValidIndex].recordedAt < cutoff) firstValidIndex += 1;
|
|
318
|
+
if (firstValidIndex > 0) this.samples = this.samples.slice(firstValidIndex);
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region src/observability/Services/LocalDiagnosticsMetrics.ts
|
|
323
|
+
var LocalDiagnosticsMetrics = class extends effect.Context.Service()("ryco/observability/Services/LocalDiagnosticsMetrics") {};
|
|
324
|
+
const makeLocalDiagnosticsMetrics = effect.Effect.sync(() => {
|
|
325
|
+
const turnQuiescenceWindow = new RollingDurationWindow({
|
|
326
|
+
maxSamples: 256,
|
|
327
|
+
maxWindowMs: DEFAULT_ROLLING_WINDOW_MS
|
|
328
|
+
});
|
|
329
|
+
const checkpointDurationWindow = new RollingDurationWindow({
|
|
330
|
+
maxSamples: 256,
|
|
331
|
+
maxWindowMs: DEFAULT_ROLLING_WINDOW_MS
|
|
332
|
+
});
|
|
333
|
+
let wsReconnectCount = 0;
|
|
334
|
+
return {
|
|
335
|
+
recordTurnQuiescenceMs: (durationMs) => effect.Effect.sync(() => {
|
|
336
|
+
turnQuiescenceWindow.record(durationMs);
|
|
337
|
+
}),
|
|
338
|
+
recordCheckpointDurationMs: (durationMs) => effect.Effect.sync(() => {
|
|
339
|
+
checkpointDurationWindow.record(durationMs);
|
|
340
|
+
}),
|
|
341
|
+
recordWsReconnect: () => effect.Effect.sync(() => {
|
|
342
|
+
wsReconnectCount += 1;
|
|
343
|
+
}),
|
|
344
|
+
snapshot: effect.Effect.gen(function* () {
|
|
345
|
+
const capturedAt = yield* effect.DateTime.now;
|
|
346
|
+
return {
|
|
347
|
+
turnQuiescenceAvgMs: turnQuiescenceWindow.average(),
|
|
348
|
+
checkpointDurationP95Ms: checkpointDurationWindow.percentile(95),
|
|
349
|
+
wsReconnectCount,
|
|
350
|
+
windowSampleCounts: {
|
|
351
|
+
turnQuiescence: turnQuiescenceWindow.count(),
|
|
352
|
+
checkpointDuration: checkpointDurationWindow.count()
|
|
353
|
+
},
|
|
354
|
+
capturedAt: effect.DateTime.formatIso(capturedAt)
|
|
355
|
+
};
|
|
356
|
+
})
|
|
357
|
+
};
|
|
358
|
+
});
|
|
359
|
+
const LocalDiagnosticsMetricsLive = effect.Layer.effect(LocalDiagnosticsMetrics, makeLocalDiagnosticsMetrics);
|
|
276
360
|
//#endregion
|
|
277
361
|
//#region src/observability/Metrics.ts
|
|
278
362
|
const metricNames = {
|
|
@@ -287,6 +371,10 @@ const metricNames = {
|
|
|
287
371
|
providerTurnDuration: "ryco_provider_turn_duration",
|
|
288
372
|
providerRuntimeEventsTotal: "ryco_provider_runtime_events_total",
|
|
289
373
|
providerEventLogRecordsDroppedTotal: "ryco_provider_event_log_records_dropped_total",
|
|
374
|
+
runtimeQueueEnqueuesTotal: "ryco_runtime_queue_enqueues_total",
|
|
375
|
+
runtimeQueueDequeuesTotal: "ryco_runtime_queue_dequeues_total",
|
|
376
|
+
runtimeQueueDepth: "ryco_runtime_queue_depth",
|
|
377
|
+
runtimeQueueHighWater: "ryco_runtime_queue_high_water",
|
|
290
378
|
startupCommandGateEnqueuesTotal: "ryco_startup_command_gate_enqueues_total",
|
|
291
379
|
startupCommandGateQueueDepth: "ryco_startup_command_gate_queue_depth",
|
|
292
380
|
startupCommandGateQueueHighWater: "ryco_startup_command_gate_queue_high_water",
|
|
@@ -311,6 +399,10 @@ const providerTurnsTotal = effect.Metric.counter(metricNames.providerTurnsTotal,
|
|
|
311
399
|
const providerTurnDuration = effect.Metric.timer(metricNames.providerTurnDuration, { description: "Provider turn request duration." });
|
|
312
400
|
const providerRuntimeEventsTotal = effect.Metric.counter(metricNames.providerRuntimeEventsTotal, { description: "Total canonical provider runtime events processed." });
|
|
313
401
|
const providerEventLogRecordsDroppedTotal = effect.Metric.counter(metricNames.providerEventLogRecordsDroppedTotal, { description: "Total provider observability log records dropped by bounded logging queues." });
|
|
402
|
+
const runtimeQueueEnqueuesTotal = effect.Metric.counter(metricNames.runtimeQueueEnqueuesTotal, { description: "Total runtime queue enqueue attempts by queue." });
|
|
403
|
+
const runtimeQueueDequeuesTotal = effect.Metric.counter(metricNames.runtimeQueueDequeuesTotal, { description: "Total runtime queue dequeues by queue." });
|
|
404
|
+
const runtimeQueueDepth = effect.Metric.gauge(metricNames.runtimeQueueDepth, { description: "Current tracked runtime queue depth." });
|
|
405
|
+
const runtimeQueueHighWater = effect.Metric.gauge(metricNames.runtimeQueueHighWater, { description: "Highest observed tracked runtime queue depth." });
|
|
314
406
|
const startupCommandGateEnqueuesTotal = effect.Metric.counter(metricNames.startupCommandGateEnqueuesTotal, { description: "Total startup command gate enqueue attempts by outcome." });
|
|
315
407
|
const startupCommandGateQueueDepth = effect.Metric.gauge(metricNames.startupCommandGateQueueDepth, { description: "Current number of commands waiting for startup command readiness." });
|
|
316
408
|
const startupCommandGateQueueHighWater = effect.Metric.gauge(metricNames.startupCommandGateQueueHighWater, { description: "Highest observed startup command gate queue depth." });
|
|
@@ -362,6 +454,18 @@ Object.defineProperty(exports, "DEFAULT_PORT", {
|
|
|
362
454
|
return DEFAULT_PORT;
|
|
363
455
|
}
|
|
364
456
|
});
|
|
457
|
+
Object.defineProperty(exports, "LocalDiagnosticsMetrics", {
|
|
458
|
+
enumerable: true,
|
|
459
|
+
get: function() {
|
|
460
|
+
return LocalDiagnosticsMetrics;
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
Object.defineProperty(exports, "LocalDiagnosticsMetricsLive", {
|
|
464
|
+
enumerable: true,
|
|
465
|
+
get: function() {
|
|
466
|
+
return LocalDiagnosticsMetricsLive;
|
|
467
|
+
}
|
|
468
|
+
});
|
|
365
469
|
Object.defineProperty(exports, "RuntimeMode", {
|
|
366
470
|
enumerable: true,
|
|
367
471
|
get: function() {
|
|
@@ -578,6 +682,30 @@ Object.defineProperty(exports, "rpcRequestsTotal", {
|
|
|
578
682
|
return rpcRequestsTotal;
|
|
579
683
|
}
|
|
580
684
|
});
|
|
685
|
+
Object.defineProperty(exports, "runtimeQueueDepth", {
|
|
686
|
+
enumerable: true,
|
|
687
|
+
get: function() {
|
|
688
|
+
return runtimeQueueDepth;
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
Object.defineProperty(exports, "runtimeQueueDequeuesTotal", {
|
|
692
|
+
enumerable: true,
|
|
693
|
+
get: function() {
|
|
694
|
+
return runtimeQueueDequeuesTotal;
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
Object.defineProperty(exports, "runtimeQueueEnqueuesTotal", {
|
|
698
|
+
enumerable: true,
|
|
699
|
+
get: function() {
|
|
700
|
+
return runtimeQueueEnqueuesTotal;
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
Object.defineProperty(exports, "runtimeQueueHighWater", {
|
|
704
|
+
enumerable: true,
|
|
705
|
+
get: function() {
|
|
706
|
+
return runtimeQueueHighWater;
|
|
707
|
+
}
|
|
708
|
+
});
|
|
581
709
|
Object.defineProperty(exports, "sanitizeBranchFragment", {
|
|
582
710
|
enumerable: true,
|
|
583
711
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { i as PtySpawnError, r as PtyAdapter } from "./bin.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { Effect, FileSystem, Layer, Path } from "effect";
|
|
6
6
|
//#region src/terminal/Layers/NodePTY.ts
|