charness 3.11.0 → 3.12.0
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/CHANGELOG.md +142 -0
- package/DEVELOPMENT.md +3 -3
- package/README.md +1 -1
- package/SETUP.md +6 -5
- package/agent-plugin/README.md +15 -6
- package/agent-plugin/skills/charness-delegate-claude/SKILL.md +23 -13
- package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +10 -6
- package/agent-plugin/skills/charness-delivery-loop/SKILL.md +92 -0
- package/agent-plugin/skills/charness-orchestration/SKILL.md +116 -0
- package/dist/adapters/openCodeAdapter.d.ts +15 -0
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +48 -4
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/agentLogin/agentLogin.d.ts +11 -0
- package/dist/agentLogin/agentLogin.d.ts.map +1 -1
- package/dist/agentLogin/agentLogin.js +18 -6
- package/dist/agentLogin/agentLogin.js.map +1 -1
- package/dist/apiErrorRetry.d.ts +5 -0
- package/dist/apiErrorRetry.d.ts.map +1 -1
- package/dist/apiErrorRetry.js +3 -3
- package/dist/apiErrorRetry.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +158 -20
- package/dist/bot.js.map +1 -1
- package/dist/cli/claudeProfiles.d.ts +5 -2
- package/dist/cli/claudeProfiles.d.ts.map +1 -1
- package/dist/cli/claudeProfiles.js +43 -20
- package/dist/cli/claudeProfiles.js.map +1 -1
- package/dist/cli/claudeProfilesCredit.d.ts +49 -0
- package/dist/cli/claudeProfilesCredit.d.ts.map +1 -0
- package/dist/cli/claudeProfilesCredit.js +160 -0
- package/dist/cli/claudeProfilesCredit.js.map +1 -0
- package/dist/cli/flagValue.d.ts +10 -0
- package/dist/cli/flagValue.d.ts.map +1 -0
- package/dist/cli/flagValue.js +17 -0
- package/dist/cli/flagValue.js.map +1 -0
- package/dist/connectors/telegram/commands/botSkills.js +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts +6 -1
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.js +9 -6
- package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
- package/dist/connectors/telegram/commands/compaction.d.ts +11 -0
- package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/compaction.js +208 -22
- package/dist/connectors/telegram/commands/compaction.js.map +1 -1
- package/dist/connectors/telegram/commands/runners.d.ts +5 -1
- package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/runners.js +146 -31
- package/dist/connectors/telegram/commands/runners.js.map +1 -1
- package/dist/connectors/telegram/runnerPairingMessages.d.ts +2 -7
- package/dist/connectors/telegram/runnerPairingMessages.d.ts.map +1 -1
- package/dist/connectors/telegram/runnerPairingMessages.js +5 -19
- package/dist/connectors/telegram/runnerPairingMessages.js.map +1 -1
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +52 -8
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +52 -8
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +52 -8
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +52 -8
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +52 -8
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +52 -8
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +52 -8
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +52 -8
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +52 -8
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +52 -8
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +52 -8
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +52 -8
- package/dist/i18n/zh.js.map +1 -1
- package/dist/installManager.d.ts.map +1 -1
- package/dist/installManager.js +3 -0
- package/dist/installManager.js.map +1 -1
- package/dist/instanceLock.d.ts.map +1 -1
- package/dist/instanceLock.js +2 -1
- package/dist/instanceLock.js.map +1 -1
- package/dist/platform/outbound.d.ts +14 -1
- package/dist/platform/outbound.d.ts.map +1 -1
- package/dist/platform/outbound.js.map +1 -1
- package/dist/remoteRun/cleanReport.d.ts +45 -0
- package/dist/remoteRun/cleanReport.d.ts.map +1 -0
- package/dist/remoteRun/cleanReport.js +84 -0
- package/dist/remoteRun/cleanReport.js.map +1 -0
- package/dist/remoteRun/cliArgs.d.ts +18 -0
- package/dist/remoteRun/cliArgs.d.ts.map +1 -1
- package/dist/remoteRun/cliArgs.js +100 -4
- package/dist/remoteRun/cliArgs.js.map +1 -1
- package/dist/remoteRun/commands.d.ts +30 -1
- package/dist/remoteRun/commands.d.ts.map +1 -1
- package/dist/remoteRun/commands.js +84 -9
- package/dist/remoteRun/commands.js.map +1 -1
- package/dist/remoteRun/exitCodes.d.ts +5 -0
- package/dist/remoteRun/exitCodes.d.ts.map +1 -1
- package/dist/remoteRun/exitCodes.js +6 -1
- package/dist/remoteRun/exitCodes.js.map +1 -1
- package/dist/remoteRun/foreground.d.ts +6 -0
- package/dist/remoteRun/foreground.d.ts.map +1 -1
- package/dist/remoteRun/foreground.js +13 -1
- package/dist/remoteRun/foreground.js.map +1 -1
- package/dist/remoteRun/interrupts.d.ts.map +1 -1
- package/dist/remoteRun/interrupts.js +2 -2
- package/dist/remoteRun/interrupts.js.map +1 -1
- package/dist/remoteRun/jobFiles.d.ts +6 -1
- package/dist/remoteRun/jobFiles.d.ts.map +1 -1
- package/dist/remoteRun/jobFiles.js +14 -0
- package/dist/remoteRun/jobFiles.js.map +1 -1
- package/dist/remoteRun/jobId.d.ts +5 -0
- package/dist/remoteRun/jobId.d.ts.map +1 -1
- package/dist/remoteRun/jobId.js +10 -0
- package/dist/remoteRun/jobId.js.map +1 -1
- package/dist/remoteRun/jobState.d.ts.map +1 -1
- package/dist/remoteRun/jobState.js +3 -2
- package/dist/remoteRun/jobState.js.map +1 -1
- package/dist/remoteRun/pairedRunners.d.ts +1 -1
- package/dist/remoteRun/pairedRunners.d.ts.map +1 -1
- package/dist/remoteRun/pairedRunners.js +4 -0
- package/dist/remoteRun/pairedRunners.js.map +1 -1
- package/dist/remoteRun/pathPatterns.d.ts +1 -1
- package/dist/remoteRun/pathPatterns.js +1 -1
- package/dist/remoteRun/probe.d.ts +58 -5
- package/dist/remoteRun/probe.d.ts.map +1 -1
- package/dist/remoteRun/probe.js +107 -11
- package/dist/remoteRun/probe.js.map +1 -1
- package/dist/remoteRun/probeTiming.d.ts +15 -0
- package/dist/remoteRun/probeTiming.d.ts.map +1 -0
- package/dist/remoteRun/probeTiming.js +23 -0
- package/dist/remoteRun/probeTiming.js.map +1 -0
- package/dist/remoteRun/project.d.ts +5 -0
- package/dist/remoteRun/project.d.ts.map +1 -1
- package/dist/remoteRun/project.js +10 -0
- package/dist/remoteRun/project.js.map +1 -1
- package/dist/remoteRun/projectConfig.d.ts +8 -1
- package/dist/remoteRun/projectConfig.d.ts.map +1 -1
- package/dist/remoteRun/projectConfig.js +18 -5
- package/dist/remoteRun/projectConfig.js.map +1 -1
- package/dist/remoteRun/pruneReport.d.ts +48 -0
- package/dist/remoteRun/pruneReport.d.ts.map +1 -0
- package/dist/remoteRun/pruneReport.js +80 -0
- package/dist/remoteRun/pruneReport.js.map +1 -0
- package/dist/remoteRun/remoteRunCli.d.ts +1 -1
- package/dist/remoteRun/remoteRunCli.d.ts.map +1 -1
- package/dist/remoteRun/remoteRunCli.js +20 -0
- package/dist/remoteRun/remoteRunCli.js.map +1 -1
- package/dist/remoteRun/runnerClient.d.ts +10 -0
- package/dist/remoteRun/runnerClient.d.ts.map +1 -1
- package/dist/remoteRun/runnerClient.js +19 -5
- package/dist/remoteRun/runnerClient.js.map +1 -1
- package/dist/remoteRun/runnerWait.d.ts.map +1 -1
- package/dist/remoteRun/runnerWait.js +2 -1
- package/dist/remoteRun/runnerWait.js.map +1 -1
- package/dist/remoteRun/runners.d.ts +48 -7
- package/dist/remoteRun/runners.d.ts.map +1 -1
- package/dist/remoteRun/runners.js +105 -40
- package/dist/remoteRun/runners.js.map +1 -1
- package/dist/remoteRun/runnersConfig.d.ts +24 -0
- package/dist/remoteRun/runnersConfig.d.ts.map +1 -1
- package/dist/remoteRun/runnersConfig.js +29 -2
- package/dist/remoteRun/runnersConfig.js.map +1 -1
- package/dist/remoteRun/ssh.d.ts +3 -3
- package/dist/remoteRun/ssh.d.ts.map +1 -1
- package/dist/remoteRun/ssh.js +19 -5
- package/dist/remoteRun/ssh.js.map +1 -1
- package/dist/remoteRun/submit.d.ts +1 -1
- package/dist/remoteRun/submit.d.ts.map +1 -1
- package/dist/remoteRun/submit.js +30 -2
- package/dist/remoteRun/submit.js.map +1 -1
- package/dist/runnerUtility/adminService.d.ts.map +1 -1
- package/dist/runnerUtility/adminService.js +5 -5
- package/dist/runnerUtility/adminService.js.map +1 -1
- package/dist/runnerUtility/appInstall.d.ts +9 -0
- package/dist/runnerUtility/appInstall.d.ts.map +1 -1
- package/dist/runnerUtility/appInstall.js +12 -2
- package/dist/runnerUtility/appInstall.js.map +1 -1
- package/dist/runnerUtility/execEnv.d.ts +1 -1
- package/dist/runnerUtility/execEnv.d.ts.map +1 -1
- package/dist/runnerUtility/execEnv.js +23 -5
- package/dist/runnerUtility/execEnv.js.map +1 -1
- package/dist/runnerUtility/guiAgentHeal.d.ts +3 -3
- package/dist/runnerUtility/guiAgentHeal.d.ts.map +1 -1
- package/dist/runnerUtility/guiAgentHeal.js +4 -2
- package/dist/runnerUtility/guiAgentHeal.js.map +1 -1
- package/dist/runnerUtility/homeFolders.d.ts +1 -0
- package/dist/runnerUtility/homeFolders.d.ts.map +1 -1
- package/dist/runnerUtility/homeFolders.js +2 -1
- package/dist/runnerUtility/homeFolders.js.map +1 -1
- package/dist/runnerUtility/iosCheck.d.ts +2 -0
- package/dist/runnerUtility/iosCheck.d.ts.map +1 -1
- package/dist/runnerUtility/iosCheck.js +12 -3
- package/dist/runnerUtility/iosCheck.js.map +1 -1
- package/dist/runnerUtility/keepAwake.d.ts +47 -10
- package/dist/runnerUtility/keepAwake.d.ts.map +1 -1
- package/dist/runnerUtility/keepAwake.js +108 -31
- package/dist/runnerUtility/keepAwake.js.map +1 -1
- package/dist/runnerUtility/launcher.d.ts +4 -0
- package/dist/runnerUtility/launcher.d.ts.map +1 -1
- package/dist/runnerUtility/launcher.js +31 -13
- package/dist/runnerUtility/launcher.js.map +1 -1
- package/dist/runnerUtility/linkLoop.d.ts +4 -0
- package/dist/runnerUtility/linkLoop.d.ts.map +1 -1
- package/dist/runnerUtility/linkLoop.js +15 -6
- package/dist/runnerUtility/linkLoop.js.map +1 -1
- package/dist/runnerUtility/managedNode.d.ts +84 -0
- package/dist/runnerUtility/managedNode.d.ts.map +1 -0
- package/dist/runnerUtility/managedNode.js +165 -0
- package/dist/runnerUtility/managedNode.js.map +1 -0
- package/dist/runnerUtility/nodeOnPath.d.ts +10 -0
- package/dist/runnerUtility/nodeOnPath.d.ts.map +1 -0
- package/dist/runnerUtility/nodeOnPath.js +49 -0
- package/dist/runnerUtility/nodeOnPath.js.map +1 -0
- package/dist/runnerUtility/nodeUpkeep.d.ts +140 -0
- package/dist/runnerUtility/nodeUpkeep.d.ts.map +1 -0
- package/dist/runnerUtility/nodeUpkeep.js +348 -0
- package/dist/runnerUtility/nodeUpkeep.js.map +1 -0
- package/dist/runnerUtility/nodeUpkeepTiming.d.ts +14 -0
- package/dist/runnerUtility/nodeUpkeepTiming.d.ts.map +1 -0
- package/dist/runnerUtility/nodeUpkeepTiming.js +21 -0
- package/dist/runnerUtility/nodeUpkeepTiming.js.map +1 -0
- package/dist/runnerUtility/packageManagerShims.d.ts +10 -0
- package/dist/runnerUtility/packageManagerShims.d.ts.map +1 -1
- package/dist/runnerUtility/packageManagerShims.js +67 -3
- package/dist/runnerUtility/packageManagerShims.js.map +1 -1
- package/dist/runnerUtility/pueueDaemon.d.ts +73 -8
- package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
- package/dist/runnerUtility/pueueDaemon.js +90 -15
- package/dist/runnerUtility/pueueDaemon.js.map +1 -1
- package/dist/runnerUtility/runnerCommands.d.ts +7 -1
- package/dist/runnerUtility/runnerCommands.d.ts.map +1 -1
- package/dist/runnerUtility/runnerCommands.js +119 -16
- package/dist/runnerUtility/runnerCommands.js.map +1 -1
- package/dist/runnerUtility/runnerHome.d.ts +34 -0
- package/dist/runnerUtility/runnerHome.d.ts.map +1 -1
- package/dist/runnerUtility/runnerHome.js +17 -3
- package/dist/runnerUtility/runnerHome.js.map +1 -1
- package/dist/runnerUtility/serviceCommon.d.ts +2 -0
- package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
- package/dist/runnerUtility/serviceCommon.js +3 -1
- package/dist/runnerUtility/serviceCommon.js.map +1 -1
- package/dist/runnerUtility/serviceManager.d.ts.map +1 -1
- package/dist/runnerUtility/serviceManager.js +7 -2
- package/dist/runnerUtility/serviceManager.js.map +1 -1
- package/dist/runnerUtility/simctlGuard.d.ts +38 -0
- package/dist/runnerUtility/simctlGuard.d.ts.map +1 -0
- package/dist/runnerUtility/simctlGuard.js +166 -0
- package/dist/runnerUtility/simctlGuard.js.map +1 -0
- package/dist/runners/bootstrapLine.d.ts +3 -4
- package/dist/runners/bootstrapLine.d.ts.map +1 -1
- package/dist/runners/bootstrapLine.js +108 -83
- package/dist/runners/bootstrapLine.js.map +1 -1
- package/dist/runners/hubPackage.d.ts +1 -1
- package/dist/runners/hubPackage.d.ts.map +1 -1
- package/dist/runners/hubPackage.js +5 -6
- package/dist/runners/hubPackage.js.map +1 -1
- package/dist/runners/hubPairing.d.ts +19 -0
- package/dist/runners/hubPairing.d.ts.map +1 -1
- package/dist/runners/hubPairing.js +38 -0
- package/dist/runners/hubPairing.js.map +1 -1
- package/dist/runners/hubRegistry.d.ts +8 -0
- package/dist/runners/hubRegistry.d.ts.map +1 -1
- package/dist/runners/hubRegistry.js +6 -0
- package/dist/runners/hubRegistry.js.map +1 -1
- package/dist/runners/pairCode.d.ts +34 -3
- package/dist/runners/pairCode.d.ts.map +1 -1
- package/dist/runners/pairCode.js +65 -13
- package/dist/runners/pairCode.js.map +1 -1
- package/dist/runners/runnerGroups.d.ts +22 -0
- package/dist/runners/runnerGroups.d.ts.map +1 -0
- package/dist/runners/runnerGroups.js +41 -0
- package/dist/runners/runnerGroups.js.map +1 -0
- package/dist/runners/runnersCli.d.ts +5 -2
- package/dist/runners/runnersCli.d.ts.map +1 -1
- package/dist/runners/runnersCli.js +59 -9
- package/dist/runners/runnersCli.js.map +1 -1
- package/dist/runners/runnersList.d.ts +1 -1
- package/dist/runners/runnersList.d.ts.map +1 -1
- package/dist/runners/runnersList.js +3 -1
- package/dist/runners/runnersList.js.map +1 -1
- package/dist/runners/runnersOverview.d.ts.map +1 -1
- package/dist/runners/runnersOverview.js +8 -4
- package/dist/runners/runnersOverview.js.map +1 -1
- package/dist/scheduler/checkStatus.d.ts +2 -0
- package/dist/scheduler/checkStatus.d.ts.map +1 -1
- package/dist/scheduler/checkStatus.js +5 -4
- package/dist/scheduler/checkStatus.js.map +1 -1
- package/dist/scheduler/delivery.d.ts +2 -1
- package/dist/scheduler/delivery.d.ts.map +1 -1
- package/dist/scheduler/delivery.js +5 -1
- package/dist/scheduler/delivery.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts +7 -3
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +48 -22
- package/dist/scheduler/mcpSurface.js.map +1 -1
- package/dist/scheduler/workerWatch.d.ts +33 -10
- package/dist/scheduler/workerWatch.d.ts.map +1 -1
- package/dist/scheduler/workerWatch.js +37 -11
- package/dist/scheduler/workerWatch.js.map +1 -1
- package/dist/state.d.ts +95 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +145 -7
- package/dist/state.js.map +1 -1
- package/dist/testTimings.d.ts +6 -2
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +12 -1
- package/dist/testTimings.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/agentPlugin.d.ts +2 -1
- package/dist/utils/agentPlugin.d.ts.map +1 -1
- package/dist/utils/agentPlugin.js +2 -1
- package/dist/utils/agentPlugin.js.map +1 -1
- package/dist/utils/botSkills.d.ts +1 -1
- package/dist/utils/claudeApiAgentStop.d.ts +64 -0
- package/dist/utils/claudeApiAgentStop.d.ts.map +1 -0
- package/dist/utils/claudeApiAgentStop.js +85 -0
- package/dist/utils/claudeApiAgentStop.js.map +1 -0
- package/dist/utils/claudeApiCredit.d.ts +168 -0
- package/dist/utils/claudeApiCredit.d.ts.map +1 -0
- package/dist/utils/claudeApiCredit.js +260 -0
- package/dist/utils/claudeApiCredit.js.map +1 -0
- package/dist/utils/claudeApiCreditRecheck.d.ts +120 -0
- package/dist/utils/claudeApiCreditRecheck.d.ts.map +1 -0
- package/dist/utils/claudeApiCreditRecheck.js +173 -0
- package/dist/utils/claudeApiCreditRecheck.js.map +1 -0
- package/dist/utils/claudeCompactHook.d.ts +18 -10
- package/dist/utils/claudeCompactHook.d.ts.map +1 -1
- package/dist/utils/claudeCompactHook.js +35 -14
- package/dist/utils/claudeCompactHook.js.map +1 -1
- package/dist/utils/claudeProfileUsageLines.d.ts +13 -1
- package/dist/utils/claudeProfileUsageLines.d.ts.map +1 -1
- package/dist/utils/claudeProfileUsageLines.js +75 -4
- package/dist/utils/claudeProfileUsageLines.js.map +1 -1
- package/dist/utils/claudeProfileUsageViews.d.ts +46 -0
- package/dist/utils/claudeProfileUsageViews.d.ts.map +1 -0
- package/dist/utils/claudeProfileUsageViews.js +114 -0
- package/dist/utils/claudeProfileUsageViews.js.map +1 -0
- package/dist/utils/claudeProfiles.d.ts +15 -0
- package/dist/utils/claudeProfiles.d.ts.map +1 -1
- package/dist/utils/claudeProfiles.js +54 -0
- package/dist/utils/claudeProfiles.js.map +1 -1
- package/dist/utils/claudeUsage.d.ts +94 -36
- package/dist/utils/claudeUsage.d.ts.map +1 -1
- package/dist/utils/claudeUsage.js +134 -60
- package/dist/utils/claudeUsage.js.map +1 -1
- package/dist/utils/compactOnIdle.d.ts +140 -15
- package/dist/utils/compactOnIdle.d.ts.map +1 -1
- package/dist/utils/compactOnIdle.js +209 -23
- package/dist/utils/compactOnIdle.js.map +1 -1
- package/dist/utils/compactSelfReviewFlags.d.ts +50 -0
- package/dist/utils/compactSelfReviewFlags.d.ts.map +1 -0
- package/dist/utils/compactSelfReviewFlags.js +120 -0
- package/dist/utils/compactSelfReviewFlags.js.map +1 -0
- package/dist/utils/fallbackChain.d.ts +18 -7
- package/dist/utils/fallbackChain.d.ts.map +1 -1
- package/dist/utils/fallbackChain.js +28 -12
- package/dist/utils/fallbackChain.js.map +1 -1
- package/dist/utils/openCodeCompactPlugin.d.ts +28 -7
- package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
- package/dist/utils/openCodeCompactPlugin.js +80 -15
- package/dist/utils/openCodeCompactPlugin.js.map +1 -1
- package/dist/utils/runnersScreenPlan.d.ts +51 -20
- package/dist/utils/runnersScreenPlan.d.ts.map +1 -1
- package/dist/utils/runnersScreenPlan.js +143 -28
- package/dist/utils/runnersScreenPlan.js.map +1 -1
- package/dist/utils/streamedCompactionSummary.d.ts +65 -0
- package/dist/utils/streamedCompactionSummary.d.ts.map +1 -0
- package/dist/utils/streamedCompactionSummary.js +108 -0
- package/dist/utils/streamedCompactionSummary.js.map +1 -0
- package/package.json +2 -2
- package/remoteRun/ensureNode.sh +288 -0
- package/remoteRun/runner.sh +2252 -115
- package/agent-plugin/skills/charness-manager/SKILL.md +0 -157
- package/remoteRun/pickNode.sh +0 -65
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.millisecondsPerMinute = exports.diskTooLowRunnerExitCode = void 0;
|
|
4
|
+
exports.parsePrunedCopies = parsePrunedCopies;
|
|
5
|
+
exports.formatPrunedCopyLine = formatPrunedCopyLine;
|
|
6
|
+
exports.parseRemovalStop = parseRemovalStop;
|
|
7
|
+
exports.formatRemovalStopLine = formatRemovalStopLine;
|
|
8
|
+
exports.formatPruneHeadsUp = formatPruneHeadsUp;
|
|
9
|
+
exports.describePrepareTimeout = describePrepareTimeout;
|
|
10
|
+
const probe_1 = require("./probe");
|
|
11
|
+
/**
|
|
12
|
+
* @description What `runner.sh prepare` says about the project copies its prune removed: one `removed=<slug> freed_kb=<n> why=<idle|space>` line per copy
|
|
13
|
+
* (`stuck=<slug>` for one that would not go), shown to the user as one short line each; `stopped=<slug> freed_kb=<n> size_kb=<n>` when a removal gave next to nothing back and the prune
|
|
14
|
+
* stopped. The refusal of a submit on a disk that is still too full is the runner's own words under {@link diskTooLowRunnerExitCode}.
|
|
15
|
+
*/
|
|
16
|
+
/** The exit code `runner.sh prepare` ends with when the work disk is still short of free space after the prune (`low_disk_exit_code` there: the two are one number; 28 is ENOSPC). */
|
|
17
|
+
exports.diskTooLowRunnerExitCode = 28;
|
|
18
|
+
const kilobytesPerMegabyte = 1024;
|
|
19
|
+
/** Why a copy was removed: unused for days, the disk was short of free space, or its owner asked (`remote-run clean`). */
|
|
20
|
+
const prunedCopyReasons = ['idle', 'space', 'clean'];
|
|
21
|
+
const removedLinePattern = /^removed=(\S+) freed_kb=(\d*) why=(idle|space|clean)$/;
|
|
22
|
+
const stuckLinePattern = /^stuck=(\S+)$/;
|
|
23
|
+
/** @description The copies a `prepare` answer says were removed, in the order the runner removed them. Other lines (`work=…`) are not this report's. */
|
|
24
|
+
function parsePrunedCopies(prepareOutput) {
|
|
25
|
+
const copies = [];
|
|
26
|
+
for (const line of prepareOutput.split('\n')) {
|
|
27
|
+
const removed = removedLinePattern.exec(line.trim());
|
|
28
|
+
const reason = removed === null ? undefined : prunedCopyReasons.find((candidate) => candidate === removed[3]);
|
|
29
|
+
if (removed !== null && reason !== undefined) {
|
|
30
|
+
const freedKb = removed[2] === '' ? null : Number(removed[2]);
|
|
31
|
+
copies.push({ slug: removed[1], isStuck: false, freedMb: freedKb === null ? null : freedKb / kilobytesPerMegabyte, reason });
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const stuck = stuckLinePattern.exec(line.trim());
|
|
35
|
+
if (stuck !== null)
|
|
36
|
+
copies.push({ slug: stuck[1], isStuck: true });
|
|
37
|
+
}
|
|
38
|
+
return copies;
|
|
39
|
+
}
|
|
40
|
+
/** @description `runner mac: removed the project copy app-1a2b3c (freed 41 GB, unused for days)` — one line for the submit's output. */
|
|
41
|
+
function formatPrunedCopyLine(runnerName, copy) {
|
|
42
|
+
if (copy.isStuck)
|
|
43
|
+
return `runner ${runnerName}: could not remove the project copy ${copy.slug} completely (read-only or in use) — the next prune tries again`;
|
|
44
|
+
const reasonTexts = { idle: 'unused for days', space: 'the disk was short of free space', clean: 'cleaned on request' };
|
|
45
|
+
const why = reasonTexts[copy.reason];
|
|
46
|
+
const freed = copy.freedMb === null ? '' : `freed ${(0, probe_1.formatGigabytes)(copy.freedMb)}, `;
|
|
47
|
+
return `runner ${runnerName}: removed the project copy ${copy.slug} (${freed}${why})`;
|
|
48
|
+
}
|
|
49
|
+
const stoppedLinePattern = /^stopped=(\S+) freed_kb=(\d+) size_kb=(\d+)$/;
|
|
50
|
+
/** @description The `stopped=` line of a `prepare` answer, `null` when the prune did not stop that way. */
|
|
51
|
+
function parseRemovalStop(prepareOutput) {
|
|
52
|
+
for (const line of prepareOutput.split('\n')) {
|
|
53
|
+
const stopped = stoppedLinePattern.exec(line.trim());
|
|
54
|
+
if (stopped !== null)
|
|
55
|
+
return { slug: stopped[1], freedMb: Number(stopped[2]) / kilobytesPerMegabyte, sizeMb: Number(stopped[3]) / kilobytesPerMegabyte };
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @description `runner mac: removing project copies gave back almost nothing twice in a row (the last, app-1: 0 GB of its 30 GB) …` — why the runner did not remove more, and the causes it points at.
|
|
61
|
+
* «Twice» is `no_progress_stop_after` in `runner.sh`: one removal that frees little can be a job writing to the same disk meanwhile.
|
|
62
|
+
*/
|
|
63
|
+
function formatRemovalStopLine(runnerName, stop) {
|
|
64
|
+
return `runner ${runnerName}: removing project copies gave back almost nothing twice in a row (the last, ${stop.slug}: ${(0, probe_1.formatGigabytes)(stop.freedMb)} of its ${(0, probe_1.formatGigabytes)(stop.sizeMb)}) — the disk's free space is not following (a Mac keeps it while Time Machine local snapshots or purgeable space hold it; jobs writing meanwhile eat it too, see docs/remote-run.md), so it stopped removing more copies`;
|
|
65
|
+
}
|
|
66
|
+
exports.millisecondsPerMinute = 60 * 1000;
|
|
67
|
+
/**
|
|
68
|
+
* @description The line before a `prepare` that is going to be slow: the runner's disk (as its probe a moment ago found it) is under what it keeps free, so it will remove old project copies first —
|
|
69
|
+
* minutes of silence on a big disk. `null` when the disk is fine or nothing is known (a submit says nothing extra then).
|
|
70
|
+
*/
|
|
71
|
+
function formatPruneHeadsUp(runnerName, probe) {
|
|
72
|
+
if (probe === null || !(0, probe_1.checkIsDiskLow)(probe) || probe.diskMinFreeMb === null)
|
|
73
|
+
return null;
|
|
74
|
+
return `runner ${runnerName}: ${(0, probe_1.formatGigabytes)(probe.diskFreeMb)} free, it keeps ${(0, probe_1.formatGigabytes)(probe.diskMinFreeMb)} — removing the least recently used project copies first (this can take minutes)`;
|
|
75
|
+
}
|
|
76
|
+
/** @description What a `prepare` that ran out of its time says: the runner carries on with the removal as far as it can (it ignores the closed pipe, `cmd_prepare`) and the next submit continues where it stopped, so trying again soon is the way (not a failure of the runner). */
|
|
77
|
+
function describePrepareTimeout(runnerName, timeoutMs) {
|
|
78
|
+
return `runner "${runnerName}": preparing the job took longer than ${Math.round(timeoutMs / exports.millisecondsPerMinute)} minutes (it removes old project copies first, which is slow on a big disk) — the runner carries on with that as far as it can: submit again in a few minutes, the next submit continues where it stopped`;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=pruneReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pruneReport.js","sourceRoot":"","sources":["../../src/remoteRun/pruneReport.ts"],"names":[],"mappings":";;;AA0BA,8CAcC;AAGD,oDAMC;AAYD,4CAMC;AAMD,sDAEC;AAQD,gDAGC;AAGD,wDAEC;AA3FD,mCAA4E;AAE5E;;;;GAIG;AAEH,sLAAsL;AACzK,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAElC,0HAA0H;AAC1H,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAQ9D,MAAM,kBAAkB,GAAG,uDAAuD,CAAC;AACnF,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,wJAAwJ;AACxJ,SAAgB,iBAAiB,CAAC,aAAqB;IACrD,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,KAAK,MAAM,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7C,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,OAAO,KAAK,IAAI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AC,IAAI,KAAK,CAAC,aAAa,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1F,OAAO,UAAU,UAAU,KAAK,IAAA,uBAAe,EAAC,KAAK,CAAC,UAAU,CAAC,mBAAmB,IAAA,uBAAe,EAAC,KAAK,CAAC,aAAa,CAAC,kFAAkF,CAAC;AAC7M,CAAC;AAED,sRAAsR;AACtR,SAAgB,sBAAsB,CAAC,UAAkB,EAAE,SAAiB;IAC1E,OAAO,WAAW,UAAU,yCAAyC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,6BAAqB,CAAC,2MAA2M,CAAC;AAChU,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { type RunnersConfig } from './runnersConfig';
|
|
|
9
9
|
* the state store: it needs nothing from an instance.
|
|
10
10
|
*/
|
|
11
11
|
export { createProcessIo };
|
|
12
|
-
export declare const remoteRunUsage = "Usage:\n charness remote-run [--runner <name>] [--needs android|ios|docker|playwright] [--runner-wait <dur>] [--group <g>]\n [--timeout <dur>] [--with-git] [--send <path>]\u2026 [-e NAME=VALUE]\u2026 [--bg] <command\u2026>\n run <command> on a runner, in the same folder of a copy of this git project;\n output and exit code come back, interrupt or timeout kills the remote job.\n --bg prints a job id and returns (long runs).\n --send <path> sends a held-back secret-looking file (a pattern, relative to the project root) for this call only.\n --needs with a paired runner that has it but is offline waits for it up to --runner-wait\n (default 15m, 0 = fail at once). An iOS build or a Simulator test always carries --needs ios: an\n always-on Mac runs such a job in its login session and refuses it with the reason when there is none.\n Options go BEFORE the command; a command that starts with a subcommand name goes after --\n (--runner <name> exec \u2026 is exec on that runner; other options before a subcommand name are refused)\n charness remote-run runners the runners: online, hardware, load, what each can do\n charness remote-run ls [--all] jobs of this project (all projects with --all)\n charness remote-run status <id> one job\n charness remote-run logs <id> [-f] [--tail N]\n charness remote-run wait <id> block until the job ends, fetch its files, exit with its code\n charness remote-run kill <id>\n charness remote-run fetch <id> bring a finished job's result files back (again)\n charness remote-run exec [--runner <name>] <command\u2026>\n one-off command in the runner's copy as the last job left it (no sync)\nExit codes: the command's own; 125 remote-run failed, 124 timeout, 130/143/129 interrupted (SIGINT/SIGTERM/SIGHUP), 141 stdout closed (| head), 137 job killed, 2 bad usage.\nSetup: docs/remote-run.md\n";
|
|
12
|
+
export declare const remoteRunUsage = "Usage:\n charness remote-run [--runner <name>] [--needs android|ios|docker|playwright] [--runner-wait <dur>] [--group <g>]\n [--timeout <dur>] [--with-git] [--send <path>]\u2026 [-e NAME=VALUE]\u2026 [--bg] <command\u2026>\n run <command> on a runner, in the same folder of a copy of this git project;\n output and exit code come back, interrupt or timeout kills the remote job.\n --bg prints a job id and returns (long runs).\n The words of <command\u2026> are joined with spaces and read again by the runner's shell: pass a whole script as ONE quoted word\n (`bash -c '<script>'` is quoted for you; a wrapper such as nice, env or timeout, or `python3 -c`, is not).\n --send <path> sends a held-back secret-looking file (a pattern, relative to the project root) for this call only.\n --needs with a paired runner that has it but is offline waits for it up to --runner-wait\n (default 15m, 0 = fail at once). An iOS build or a Simulator test always carries --needs ios: an\n always-on Mac runs such a job in its login session and refuses it with the reason when there is none.\n Options go BEFORE the command; a command that starts with a subcommand name goes after --\n (--runner <name> exec \u2026 is exec on that runner; other options before a subcommand name are refused)\n charness remote-run runners the runners: online, hardware, load, what each can do\n charness remote-run ls [--all] jobs of this project (all projects with --all)\n charness remote-run status <id> one job\n charness remote-run logs <id> [-f] [--tail N]\n charness remote-run wait <id> block until the job ends, fetch its files, exit with its code\n charness remote-run kill <id>\n charness remote-run fetch <id> bring a finished job's result files back (again)\n charness remote-run exec [--runner <name>] <command\u2026>\n one-off command in the runner's copy as the last job left it (no sync)\n charness remote-run clean [<slug>]\n remove this project folder's copy from every runner (or the named one: the name a runner's disk message gives,\n myapp-0a1b2c3d4e). The copy is shared by every task run from the folder: clean when the LAST of them is closed.\n Frees its disk; its jobs' logs and result files go with it. Refused (exit 125) while a job of it runs or waits,\n an exec runs in it, a job is being submitted, or a job that ended under an hour ago was not fetched (wait / fetch it).\nJobs beside each other: a runner may run several jobs at once (the operator sets how many: /runners, `charness runners jobs-at-once`), so a job of\n another project can be running next to yours. Every step of a job gets, besides your -e lines:\n REMOTE_RUN_PORT_BASE the first of the 100 ports the job owns: bind from it (+0 \u2026 +99), never a fixed 8081 / 8080\n TMPDIR a folder of this project's copy alone (caches such as Metro's are not shared with other projects)\n REMOTE_RUN_IOS_SIMULATOR_UDID with --needs ios on a Mac: the job's own booted Simulator (Detox: device { id }); unset when the runner could not make one\n `exec` has none of them. Never `xcrun simctl shutdown|erase|delete all` (the runner turns it into your own device, or nothing) and never `booted` as a device\n (it may be another job's: use the id above; `install|launch|\u2026 booted` are turned into it too), `killall Simulator` or\n `lsof -ti tcp:<port> | xargs kill` on a port that is not yours: stop what you started, by its pid. docs/remote-run.md, \u00ABJobs beside each other\u00BB.\nExit codes: the command's own; 125 remote-run failed, 124 timeout, 130/143/129 interrupted (SIGINT/SIGTERM/SIGHUP), 141 stdout closed (| head), 137 job killed, 2 bad usage.\nSetup: docs/remote-run.md\n";
|
|
13
13
|
/**
|
|
14
14
|
* @description The runners as they are right now, for a look in the middle of a command (the wait for an offline runner re-reads them at
|
|
15
15
|
* every look). A file that is half-way through an edit, or a name that clashes for a moment, must not end a wait that may be 15 minutes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteRunCli.d.ts","sourceRoot":"","sources":["../../src/remoteRun/remoteRunCli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remoteRunCli.d.ts","sourceRoot":"","sources":["../../src/remoteRun/remoteRunCli.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,eAAe,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAGvD,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAO3E;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,cAAc,qqIAsC1B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAOjE;AA0BD,qGAAqG;AACrG,wBAAsB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,GAAE,KAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC7G"}
|
|
@@ -15,6 +15,7 @@ const runnerClient_1 = require("./runnerClient");
|
|
|
15
15
|
const runnersConfig_1 = require("./runnersConfig");
|
|
16
16
|
const runnersCatalog_1 = require("./runnersCatalog");
|
|
17
17
|
const runnerWait_1 = require("./runnerWait");
|
|
18
|
+
const probeTiming_1 = require("./probeTiming");
|
|
18
19
|
const runnerWaitTiming_1 = require("./runnerWaitTiming");
|
|
19
20
|
const ssh_1 = require("./ssh");
|
|
20
21
|
exports.remoteRunUsage = `Usage:
|
|
@@ -23,6 +24,8 @@ exports.remoteRunUsage = `Usage:
|
|
|
23
24
|
run <command> on a runner, in the same folder of a copy of this git project;
|
|
24
25
|
output and exit code come back, interrupt or timeout kills the remote job.
|
|
25
26
|
--bg prints a job id and returns (long runs).
|
|
27
|
+
The words of <command…> are joined with spaces and read again by the runner's shell: pass a whole script as ONE quoted word
|
|
28
|
+
(\`bash -c '<script>'\` is quoted for you; a wrapper such as nice, env or timeout, or \`python3 -c\`, is not).
|
|
26
29
|
--send <path> sends a held-back secret-looking file (a pattern, relative to the project root) for this call only.
|
|
27
30
|
--needs with a paired runner that has it but is offline waits for it up to --runner-wait
|
|
28
31
|
(default 15m, 0 = fail at once). An iOS build or a Simulator test always carries --needs ios: an
|
|
@@ -38,6 +41,19 @@ exports.remoteRunUsage = `Usage:
|
|
|
38
41
|
charness remote-run fetch <id> bring a finished job's result files back (again)
|
|
39
42
|
charness remote-run exec [--runner <name>] <command…>
|
|
40
43
|
one-off command in the runner's copy as the last job left it (no sync)
|
|
44
|
+
charness remote-run clean [<slug>]
|
|
45
|
+
remove this project folder's copy from every runner (or the named one: the name a runner's disk message gives,
|
|
46
|
+
myapp-0a1b2c3d4e). The copy is shared by every task run from the folder: clean when the LAST of them is closed.
|
|
47
|
+
Frees its disk; its jobs' logs and result files go with it. Refused (exit 125) while a job of it runs or waits,
|
|
48
|
+
an exec runs in it, a job is being submitted, or a job that ended under an hour ago was not fetched (wait / fetch it).
|
|
49
|
+
Jobs beside each other: a runner may run several jobs at once (the operator sets how many: /runners, \`charness runners jobs-at-once\`), so a job of
|
|
50
|
+
another project can be running next to yours. Every step of a job gets, besides your -e lines:
|
|
51
|
+
REMOTE_RUN_PORT_BASE the first of the 100 ports the job owns: bind from it (+0 … +99), never a fixed 8081 / 8080
|
|
52
|
+
TMPDIR a folder of this project's copy alone (caches such as Metro's are not shared with other projects)
|
|
53
|
+
REMOTE_RUN_IOS_SIMULATOR_UDID with --needs ios on a Mac: the job's own booted Simulator (Detox: device { id }); unset when the runner could not make one
|
|
54
|
+
\`exec\` has none of them. Never \`xcrun simctl shutdown|erase|delete all\` (the runner turns it into your own device, or nothing) and never \`booted\` as a device
|
|
55
|
+
(it may be another job's: use the id above; \`install|launch|… booted\` are turned into it too), \`killall Simulator\` or
|
|
56
|
+
\`lsof -ti tcp:<port> | xargs kill\` on a port that is not yours: stop what you started, by its pid. docs/remote-run.md, «Jobs beside each other».
|
|
41
57
|
Exit codes: the command's own; 125 remote-run failed, 124 timeout, 130/143/129 interrupted (SIGINT/SIGTERM/SIGHUP), 141 stdout closed (| head), 137 job killed, 2 bad usage.
|
|
42
58
|
Setup: docs/remote-run.md
|
|
43
59
|
`;
|
|
@@ -76,6 +92,7 @@ function createContext(io) {
|
|
|
76
92
|
now: Date.now,
|
|
77
93
|
loadRunners: () => readCurrentRunners(io.homeDir),
|
|
78
94
|
runnerPollMs: (0, runnerWaitTiming_1.readRunnerWaitPollMs)(io.env),
|
|
95
|
+
probeDeadlineMs: (0, probeTiming_1.readProbeDeadlineMs)(io.env),
|
|
79
96
|
sleep: runnerWait_1.sleepUntilStopped,
|
|
80
97
|
watchInterrupts: interrupts_1.addInterruptHandlerWithHardStop,
|
|
81
98
|
};
|
|
@@ -88,6 +105,8 @@ async function runRemoteRunCli(argv, io = (0, output_1.createProcessIo)()) {
|
|
|
88
105
|
return exitCodes_1.remoteRunExitCodes.usage;
|
|
89
106
|
}
|
|
90
107
|
const { command } = parsed;
|
|
108
|
+
if (parsed.note !== undefined)
|
|
109
|
+
io.stderr(`remote-run: ${parsed.note}\n`);
|
|
91
110
|
if (command.kind === 'help') {
|
|
92
111
|
if (argv.length === 0) {
|
|
93
112
|
io.stderr(exports.remoteRunUsage);
|
|
@@ -108,6 +127,7 @@ async function runRemoteRunCli(argv, io = (0, output_1.createProcessIo)()) {
|
|
|
108
127
|
case 'fetch': return await (0, commands_1.runFetchCommand)(command, context);
|
|
109
128
|
case 'kill': return await (0, commands_1.runKillCommand)(command, context);
|
|
110
129
|
case 'exec': return await (0, commands_1.runExecCommand)(command, context);
|
|
130
|
+
case 'clean': return await (0, commands_1.runCleanCommand)(command, context);
|
|
111
131
|
}
|
|
112
132
|
}
|
|
113
133
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteRunCli.js","sourceRoot":"","sources":["../../src/remoteRun/remoteRunCli.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"remoteRunCli.js","sourceRoot":"","sources":["../../src/remoteRun/remoteRunCli.ts"],"names":[],"mappings":";;;AAoFA,gDAOC;AA2BD,0CAsCC;AA5JD,yCAYoB;AACpB,uCAA+C;AAC/C,2CAAiD;AACjD,6CAA+D;AAC/D,+CAAqD;AACrD,qCAAuD;AAmB9C,gGAnBA,wBAAe,OAmBA;AAlBxB,qDAAkD;AAClD,iDAAkD;AAClD,mDAA2E;AAC3E,qDAAsD;AACtD,6CAAiD;AACjD,+CAAoD;AACpD,yDAA0D;AAC1D,+BAAsE;AAazD,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC7B,CAAC;AAEF;;;;;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AAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC;QACnG,OAAO,8BAAkB,CAAC,MAAM,CAAC;IACnC,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { RemoteRunError } from './remoteRunError';
|
|
1
2
|
import type { RunnerConfig } from './runnersConfig';
|
|
2
3
|
import { spawnSshStream, type SshRunResult } from './ssh';
|
|
3
4
|
/** An ordinary call: a prepare may start the Pueue daemon, a result or a kill is quicker. */
|
|
4
5
|
export declare const shortCallTimeoutMs: number;
|
|
6
|
+
/** `prepare` prunes: removing project copies of tens of GB each takes minutes (see `runner.sh`, «project copies»). */
|
|
7
|
+
export declare const prepareCallTimeoutMs: number;
|
|
5
8
|
export interface RunnerScript {
|
|
6
9
|
/** `runner-<sha8>.sh` */
|
|
7
10
|
name: string;
|
|
@@ -39,6 +42,11 @@ export interface RunnerClient {
|
|
|
39
42
|
}
|
|
40
43
|
/** Why a paired runner whose link is down is offline — the words `charness runner-proxy` (`runners/runnerProxy.ts`) puts on stderr when nothing listens on the link's socket. */
|
|
41
44
|
export declare const notConnectedReason = "the runner is not connected";
|
|
45
|
+
/**
|
|
46
|
+
* @description Did ssh itself give up waiting — its `ConnectTimeout`, a banner that never came, a server that stopped answering its keepalive — as opposed to refusing, or dropping an established connection?
|
|
47
|
+
* Over a paired runner's link (ssh goes through a unix socket, so there is no TCP connect to time out) that is a machine too loaded to finish its handshake: it is THERE, only slow.
|
|
48
|
+
*/
|
|
49
|
+
export declare function checkIsSshTimeout(text: string): boolean;
|
|
42
50
|
/**
|
|
43
51
|
* @description The first useful line of a failed ssh's stderr, for a message (never the whole text: it may quote the destination). A
|
|
44
52
|
* rejected key from a process with no ssh-agent (`SSH_AUTH_SOCK` unset — a tracker agent such as Jira's starts with a minimal environment
|
|
@@ -47,6 +55,8 @@ export declare const notConnectedReason = "the runner is not connected";
|
|
|
47
55
|
export declare function describeSshFailure(result: SshRunResult, env?: NodeJS.ProcessEnv): string;
|
|
48
56
|
/** @description The runner script's own refusal in a stderr text («remote-run-runner: no such job: x» → «no such job: x»): the last line, without the script's prefix. */
|
|
49
57
|
export declare function describeRunnerRefusal(stderr: string, fallback: string): string;
|
|
58
|
+
/** @description The error of a runner script call that ended with a non-zero exit: the runner's own last lines, or the ssh failure when it said nothing. */
|
|
59
|
+
export declare function describeCallFailure(runnerName: string, subcommand: string, result: SshRunResult): RemoteRunError;
|
|
50
60
|
/** @description Create the client of `runner`. `script` and the spawn functions are injectable for the tests. */
|
|
51
61
|
export declare function createRunnerClient(runner: RunnerConfig, cacheDir: string, script?: RunnerScript): RunnerClient;
|
|
52
62
|
//# sourceMappingURL=runnerClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runnerClient.d.ts","sourceRoot":"","sources":["../../src/remoteRun/runnerClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runnerClient.d.ts","sourceRoot":"","sources":["../../src/remoteRun/runnerClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAA0B,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAOL,cAAc,EACd,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AAUf,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,QAAY,CAAC;AAC5C,sHAAsH;AACtH,eAAO,MAAM,oBAAoB,QAAiB,CAAC;AAGnD,MAAM,WAAW,YAAY;IAC3B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oJAAoJ;AACpJ,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,gBAAgB,CAAC,UAAU,GAAE,MAA8B,GAAG,YAAY,CAGzF;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,YAA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K,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED,4JAA4J;AAC5J,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,cAAc,CAGhH;AAED,iHAAiH;AACjH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,YAAiC,GAAG,YAAY,CA2ClI"}
|
|
@@ -33,11 +33,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.notConnectedReason = exports.shortCallTimeoutMs = void 0;
|
|
36
|
+
exports.notConnectedReason = exports.prepareCallTimeoutMs = exports.shortCallTimeoutMs = void 0;
|
|
37
37
|
exports.getRunnerScriptPath = getRunnerScriptPath;
|
|
38
38
|
exports.readRunnerScript = readRunnerScript;
|
|
39
|
+
exports.checkIsSshTimeout = checkIsSshTimeout;
|
|
39
40
|
exports.describeSshFailure = describeSshFailure;
|
|
40
41
|
exports.describeRunnerRefusal = describeRunnerRefusal;
|
|
42
|
+
exports.describeCallFailure = describeCallFailure;
|
|
41
43
|
exports.createRunnerClient = createRunnerClient;
|
|
42
44
|
const crypto_1 = require("crypto");
|
|
43
45
|
const fs = __importStar(require("fs"));
|
|
@@ -53,6 +55,8 @@ const ssh_1 = require("./ssh");
|
|
|
53
55
|
const scriptHashLength = 8;
|
|
54
56
|
/** An ordinary call: a prepare may start the Pueue daemon, a result or a kill is quicker. */
|
|
55
57
|
exports.shortCallTimeoutMs = 60 * 1000;
|
|
58
|
+
/** `prepare` prunes: removing project copies of tens of GB each takes minutes (see `runner.sh`, «project copies»). */
|
|
59
|
+
exports.prepareCallTimeoutMs = 15 * 60 * 1000;
|
|
56
60
|
const scriptUploadTimeoutMs = 60 * 1000;
|
|
57
61
|
/** @description `remoteRun/runner.sh` at the package root, resolved from both `src/remoteRun` (tsx) and `dist/remoteRun` (built): two levels up. */
|
|
58
62
|
function getRunnerScriptPath() {
|
|
@@ -64,6 +68,13 @@ function readRunnerScript(scriptPath = getRunnerScriptPath()) {
|
|
|
64
68
|
}
|
|
65
69
|
/** Why a paired runner whose link is down is offline — the words `charness runner-proxy` (`runners/runnerProxy.ts`) puts on stderr when nothing listens on the link's socket. */
|
|
66
70
|
exports.notConnectedReason = 'the runner is not connected';
|
|
71
|
+
/**
|
|
72
|
+
* @description Did ssh itself give up waiting — its `ConnectTimeout`, a banner that never came, a server that stopped answering its keepalive — as opposed to refusing, or dropping an established connection?
|
|
73
|
+
* Over a paired runner's link (ssh goes through a unix socket, so there is no TCP connect to time out) that is a machine too loaded to finish its handshake: it is THERE, only slow.
|
|
74
|
+
*/
|
|
75
|
+
function checkIsSshTimeout(text) {
|
|
76
|
+
return /timed out|timeout, server .* not responding/i.test(text);
|
|
77
|
+
}
|
|
67
78
|
/**
|
|
68
79
|
* @description The first useful line of a failed ssh's stderr, for a message (never the whole text: it may quote the destination). A
|
|
69
80
|
* rejected key from a process with no ssh-agent (`SSH_AUTH_SOCK` unset — a tracker agent such as Jira's starts with a minimal environment
|
|
@@ -91,6 +102,11 @@ function describeRunnerRefusal(stderr, fallback) {
|
|
|
91
102
|
const lastLine = stderr.split('\n').map((line) => line.trim()).filter((line) => line !== '').pop();
|
|
92
103
|
return lastLine === undefined ? fallback : lastLine.replace(/^remote-run-runner: /, '');
|
|
93
104
|
}
|
|
105
|
+
/** @description The error of a runner script call that ended with a non-zero exit: the runner's own last lines, or the ssh failure when it said nothing. */
|
|
106
|
+
function describeCallFailure(runnerName, subcommand, result) {
|
|
107
|
+
const detail = result.stderr.trim() === '' ? describeSshFailure(result) : result.stderr.trim().split('\n').slice(-3).join(' / ');
|
|
108
|
+
return new remoteRunError_1.RemoteRunError(`runner "${runnerName}": ${subcommand} failed — ${detail}`);
|
|
109
|
+
}
|
|
94
110
|
/** @description Create the client of `runner`. `script` and the spawn functions are injectable for the tests. */
|
|
95
111
|
function createRunnerClient(runner, cacheDir, script = readRunnerScript()) {
|
|
96
112
|
const call = (subcommand, args, options = {}) => (0, ssh_1.runSshCommand)({
|
|
@@ -129,10 +145,8 @@ function createRunnerClient(runner, cacheDir, script = readRunnerScript()) {
|
|
|
129
145
|
call,
|
|
130
146
|
async callOrThrow(subcommand, args, options) {
|
|
131
147
|
const result = await call(subcommand, args, options);
|
|
132
|
-
if (result.exitCode !== 0)
|
|
133
|
-
|
|
134
|
-
throw new remoteRunError_1.RemoteRunError(`runner "${runner.name}": ${subcommand} failed — ${detail}`);
|
|
135
|
-
}
|
|
148
|
+
if (result.exitCode !== 0)
|
|
149
|
+
throw describeCallFailure(runner.name, subcommand, result);
|
|
136
150
|
return result.stdout;
|
|
137
151
|
},
|
|
138
152
|
stream(subcommand, args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runnerClient.js","sourceRoot":"","sources":["../../src/remoteRun/runnerClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"runnerClient.js","sourceRoot":"","sources":["../../src/remoteRun/runnerClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,kDAEC;AAED,4CAGC;AA6BD,8CAEC;AAOD,gDAaC;AAGD,sDAGC;AAGD,kDAGC;AAGD,gDA2CC;AAzJD,mCAAoC;AACpC,uCAAyB;AACzB,2CAA6B;AAC7B,qDAA0E;AAE1E,+BASe;AAEf;;;;;GAKG;AAEH,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,6FAA6F;AAChF,QAAA,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AAC5C,sHAAsH;AACzG,QAAA,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI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,CAAA;KAAE,CAAC,CAAC;IAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;CAAE,CAAC;AAE5F,MAAM,WAAW,cAAc,CAAC,OAAO;IACrC;;;OAGG;IACH,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IACzF,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC/B,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,0DAA0D;IAC1D,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,qIAAqI;IACrI,eAAe,EAAE,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAChF,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CA2CnG;AAED,gJAAgJ;AAChJ,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB9E"}
|
|
@@ -28,7 +28,8 @@ function planRunnerWait(config, reports, wanted) {
|
|
|
28
28
|
if (needs === null || wanted.runner !== null)
|
|
29
29
|
return null;
|
|
30
30
|
const candidates = reports.filter((report) => {
|
|
31
|
-
|
|
31
|
+
// A busy runner is there, not away: nothing to wait for (it is picked from its last snapshot, or the pick says why not).
|
|
32
|
+
if (report.status === 'online' || report.status === 'busy' || report.lastProbe === null)
|
|
32
33
|
return false;
|
|
33
34
|
const isPaired = config.runners.some((runner) => runner.name === report.name && runner.paired !== undefined);
|
|
34
35
|
return isPaired && !(0, probe_1.checkIsRunnerPaused)(report) && report.lastProbe.pueueVersion !== null && (0, probe_1.checkHasCapability)(report.lastProbe, needs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runnerWait.js","sourceRoot":"","sources":["../../src/remoteRun/runnerWait.ts"],"names":[],"mappings":";;;AA+BA,
|
|
1
|
+
{"version":3,"file":"runnerWait.js","sourceRoot":"","sources":["../../src/remoteRun/runnerWait.ts"],"names":[],"mappings":";;;AA+BA,wCAcC;AASD,gDAOC;AA6CD,oDA2CC;AAGD,8CAgBC;AAxKD,2CAAkE;AAClE,mCAA4H;AAC5H,qDAAkD;AAIlD;;;;;;GAMG;AAEH,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,cAAc,GAAG,IAAI,CAAC;AAU5B;;;;GAIG;AACH,SAAgB,cAAc,CAAC,MAAqB,EAAE,OAAgC,EAAE,MAAiE;IACvJ,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1D,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAyE,EAAE;QAClH,yHAAyH;QACzH,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,SAAS,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QACtG,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK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,KAAK,CAAC,CAAC;YACpB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC1C,OAAO,EAAE,CAAC;QACZ,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -6,8 +6,20 @@ import type { RunnerConfig, RunnersConfig } from './runnersConfig';
|
|
|
6
6
|
* still shows what it was, and pick the one a command should use — the named one, or the first in the catalog (`runners.json` entries,
|
|
7
7
|
* then the paired runners) that answers, is not paused and, with `--needs`, has the capability.
|
|
8
8
|
*/
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @name ProbeOptions
|
|
11
|
+
* @description `isPruneAllowed`: the probe is a VIEW of the runners (`remote-run runners`, the bot's `/runners`) and may start the runner's background prune when its disk is short. The probe that picks a runner
|
|
12
|
+
* for a run or an `exec` never does (the default): that prune has no copy to keep, and the project about to be used is typically the least recently used one — the very copy it would take before the job's own
|
|
13
|
+
* `prepare`, which keeps its slug, arrives.
|
|
14
|
+
*/
|
|
15
|
+
export interface ProbeOptions {
|
|
16
|
+
isPruneAllowed?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Has the shared deadline of the view fired? Set by {@link probeRunners}: only the DEADLINE makes a runner `busy` (it ran out of time), never the user's own stop (`stop`) — a view they interrupted
|
|
19
|
+
* has no use for a report. Absent (a single probe called by hand), the signal's own state is what is asked.
|
|
20
|
+
*/
|
|
21
|
+
hasDeadlinePassed?: () => boolean;
|
|
22
|
+
}
|
|
11
23
|
/**
|
|
12
24
|
* @description A probe of a runner that got no answer, remembered so that a quick look (`charness runners ls`) does not wait for the same
|
|
13
25
|
* silence again and again: when it was made, and since when the runner's link had been up (`null` = not known) — a link that began anew is
|
|
@@ -32,18 +44,47 @@ export declare function readLastProbe(cacheDir: string, runnerName: string, notB
|
|
|
32
44
|
} | null;
|
|
33
45
|
/** @description Forget the last report of `runnerName`, and the failed probe it may have left (a removed runner's: the name is free for the next machine). What is not there is nothing to forget. */
|
|
34
46
|
export declare function removeLastProbe(cacheDir: string, runnerName: string): void;
|
|
47
|
+
/** Why a Mac with its lid shut is not called (a shared wording: `clean` says it, the probe\'s `lid-closed` report is the same fact). */
|
|
48
|
+
export declare const lidClosedReason = "its Mac has the lid closed";
|
|
49
|
+
/**
|
|
50
|
+
* @name RunnerReachability
|
|
51
|
+
* @description Whether a runner can be called at all right now: `offline` (a paired one whose link is down, or one whose script cannot be looked for over ssh: `reason` is the short cause), `lid-closed` (its link is up but its
|
|
52
|
+
* Mac\'s lid is shut: it may be falling asleep, so it is not called), `broken` (its script could not be put there for a reason that is not a lost connection) — or `reachable`, with the script in place.
|
|
53
|
+
* `isLinkUp` (of `offline`): a paired runner whose link was up when it was asked — it is THERE, so an ssh call of it that got no answer in time says «slow», not «gone»; `isSshTimeout`: that call failed because
|
|
54
|
+
* ssh itself ran out of patience (`checkIsSshTimeout`: its own connect / banner timeout, which is shorter than the view's deadline), not because the connection was refused or dropped.
|
|
55
|
+
*/
|
|
56
|
+
export type RunnerReachability = {
|
|
57
|
+
kind: 'reachable';
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'offline';
|
|
60
|
+
reason: string;
|
|
61
|
+
lastSeenMs: number | null;
|
|
62
|
+
isLinkUp: boolean;
|
|
63
|
+
isSshTimeout: boolean;
|
|
64
|
+
} | {
|
|
65
|
+
kind: 'lid-closed';
|
|
66
|
+
lastSeenMs: number | null;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'broken';
|
|
69
|
+
message: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* @description The gate before any call to a runner (the probe, `clean`): a paired runner is asked at its link first (cheaper than an ssh call that fails through the proxy, and a Mac with its lid shut is not asked at all), then
|
|
73
|
+
* the script is looked for — and put there when missing. `signal` ends that ssh call from outside (a shared deadline).
|
|
74
|
+
*/
|
|
75
|
+
export declare function checkRunnerReachability(client: RunnerClient, signal?: AbortSignal): Promise<RunnerReachability>;
|
|
35
76
|
/**
|
|
36
|
-
* @description Probe one runner: its report is `online` with what it said, `lid-closed` (its link is up, its Mac's lid is shut: no probe is made), or
|
|
37
|
-
* `offline` with why and the last snapshot taken when it was seen. `signal` is the deadline of the whole view (see {@link probeRunners}): when it fires the ssh calls in flight are killed and the
|
|
38
|
-
* runner is reported offline — with the snapshot, like any other way of not answering.
|
|
77
|
+
* @description Probe one runner: its report is `online` with what it said, `lid-closed` (its link is up, its Mac's lid is shut: no probe is made), `busy` (it is there — linked, or its ssh answered —
|
|
78
|
+
* but the probe did not finish in time: the last snapshot is shown, marked as old), or `offline` with why and the last snapshot taken when it was seen. `signal` is the deadline of the whole view (see {@link probeRunners}): when it fires the ssh calls in flight are killed and the
|
|
79
|
+
* runner is reported `busy` when it was known to be there (see `probeRunner`) and offline otherwise — with the snapshot, like any other way of not answering.
|
|
39
80
|
*/
|
|
40
|
-
export declare function probeRunner(client: RunnerClient, nowMs?: number, signal?: AbortSignal, deadlineMs?: number): Promise<RunnerReport>;
|
|
81
|
+
export declare function probeRunner(client: RunnerClient, nowMs?: number, signal?: AbortSignal, deadlineMs?: number, options?: ProbeOptions): Promise<RunnerReport>;
|
|
41
82
|
/**
|
|
42
83
|
* @description Probe every client at once under ONE deadline (20 s): a runner that has not answered by then is reported offline with its
|
|
43
84
|
* last snapshot and its ssh calls are killed, so the view ends on time and nothing keeps the process alive afterwards. The others are not
|
|
44
85
|
* held back by it. `stop` ends the same ssh calls from outside — the user interrupted the command that asked.
|
|
45
86
|
*/
|
|
46
|
-
export declare function probeRunners(clients: readonly RunnerClient[], nowMs?: number, deadlineMs?: number, stop?: AbortSignal): Promise<RunnerReport[]>;
|
|
87
|
+
export declare function probeRunners(clients: readonly RunnerClient[], nowMs?: number, deadlineMs?: number, stop?: AbortSignal, options?: ProbeOptions): Promise<RunnerReport[]>;
|
|
47
88
|
export type RunnerPick = {
|
|
48
89
|
ok: true;
|
|
49
90
|
runnerName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runners.d.ts","sourceRoot":"","sources":["../../src/remoteRun/runners.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"runners.d.ts","sourceRoot":"","sources":["../../src/remoteRun/runners.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;AAIjB,OAAO,EAA6D,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGnE;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC;CACnC;AAsBD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,2MAA2M;AAC3M,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAE,MAAU,GAAG,YAAY,GAAG,IAAI,CAQnH;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAEnG;AAED;;;;G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