charness 3.11.0 → 3.13.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/.env.example +5 -0
- package/CHANGELOG.md +169 -0
- package/DEVELOPMENT.md +81 -18
- package/README.md +3 -2
- package/SETUP.md +71 -25
- package/agent-plugin/README.md +15 -6
- package/agent-plugin/skills/charness-delegate-claude/SKILL.md +37 -18
- 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/accessControl.d.ts +43 -0
- package/dist/accessControl.d.ts.map +1 -1
- package/dist/accessControl.js +50 -1
- package/dist/accessControl.js.map +1 -1
- package/dist/adapters/claudeCliAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeCliAdapter.js +9 -4
- package/dist/adapters/claudeCliAdapter.js.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
- package/dist/adapters/claudePlatformFlags.d.ts +4 -3
- package/dist/adapters/claudePlatformFlags.d.ts.map +1 -1
- package/dist/adapters/claudePlatformFlags.js +4 -3
- package/dist/adapters/claudePlatformFlags.js.map +1 -1
- package/dist/adapters/openCodeAdapter.d.ts +52 -13
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +121 -45
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/adapters/terminalAdapter.d.ts.map +1 -1
- package/dist/adapters/terminalAdapter.js +5 -3
- package/dist/adapters/terminalAdapter.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 +20 -20
- 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 +12 -3
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +634 -153
- 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 +45 -22
- 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/jira/client.js +1 -1
- package/dist/connectors/jira/client.js.map +1 -1
- package/dist/connectors/jira/config.d.ts +7 -0
- package/dist/connectors/jira/config.d.ts.map +1 -1
- package/dist/connectors/jira/config.js +12 -1
- package/dist/connectors/jira/config.js.map +1 -1
- package/dist/connectors/jira/connector.d.ts +7 -0
- package/dist/connectors/jira/connector.d.ts.map +1 -1
- package/dist/connectors/jira/connector.js +20 -3
- package/dist/connectors/jira/connector.js.map +1 -1
- package/dist/connectors/jira/inbound.d.ts.map +1 -1
- package/dist/connectors/jira/inbound.js +4 -3
- package/dist/connectors/jira/inbound.js.map +1 -1
- package/dist/connectors/jira/issueBlocks.d.ts +1 -1
- package/dist/connectors/jira/trustedGroup.d.ts +21 -6
- package/dist/connectors/jira/trustedGroup.d.ts.map +1 -1
- package/dist/connectors/jira/trustedGroup.js +46 -6
- package/dist/connectors/jira/trustedGroup.js.map +1 -1
- package/dist/connectors/telegram/commands/botCore.d.ts +19 -2
- package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
- 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 +16 -3
- package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/compaction.js +216 -27
- 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/commands/todo.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/todo.js +2 -2
- package/dist/connectors/telegram/commands/todo.js.map +1 -1
- package/dist/connectors/telegram/commands/topicAccess.d.ts +30 -0
- package/dist/connectors/telegram/commands/topicAccess.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/topicAccess.js +399 -0
- package/dist/connectors/telegram/commands/topicAccess.js.map +1 -0
- package/dist/connectors/telegram/inbound.d.ts +44 -7
- package/dist/connectors/telegram/inbound.d.ts.map +1 -1
- package/dist/connectors/telegram/inbound.js +142 -24
- package/dist/connectors/telegram/inbound.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 +120 -8
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +120 -8
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +120 -8
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +120 -8
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +120 -8
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +120 -8
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +120 -8
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +120 -8
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +120 -8
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +120 -8
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +120 -8
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +120 -8
- package/dist/i18n/zh.js.map +1 -1
- package/dist/installManager.d.ts +37 -1
- package/dist/installManager.d.ts.map +1 -1
- package/dist/installManager.js +208 -14
- 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/commandRouter.d.ts +13 -1
- package/dist/platform/commandRouter.d.ts.map +1 -1
- package/dist/platform/commandRouter.js +14 -2
- package/dist/platform/commandRouter.js.map +1 -1
- package/dist/platform/inbound.d.ts +2 -0
- package/dist/platform/inbound.d.ts.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/runnerLock.d.ts +36 -1
- package/dist/runners/runnerLock.d.ts.map +1 -1
- package/dist/runners/runnerLock.js +94 -30
- package/dist/runners/runnerLock.js.map +1 -1
- 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/checkRun.d.ts +0 -2
- package/dist/scheduler/checkRun.d.ts.map +1 -1
- package/dist/scheduler/checkRun.js +0 -10
- package/dist/scheduler/checkRun.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/selfUpdate/bootRollback.d.ts.map +1 -1
- package/dist/selfUpdate/bootRollback.js +3 -2
- package/dist/selfUpdate/bootRollback.js.map +1 -1
- package/dist/selfUpdate/updateRuntime.d.ts.map +1 -1
- package/dist/selfUpdate/updateRuntime.js +6 -3
- package/dist/selfUpdate/updateRuntime.js.map +1 -1
- package/dist/state.d.ts +144 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +257 -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/threadContextPreamble.d.ts +15 -1
- package/dist/threadContextPreamble.d.ts.map +1 -1
- package/dist/threadContextPreamble.js +15 -3
- package/dist/threadContextPreamble.js.map +1 -1
- package/dist/threadRouting.d.ts +47 -4
- package/dist/threadRouting.d.ts.map +1 -1
- package/dist/threadRouting.js +31 -4
- package/dist/threadRouting.js.map +1 -1
- package/dist/todos/projects.d.ts +1 -1
- package/dist/todos/projects.d.ts.map +1 -1
- package/dist/todos/projects.js +3 -14
- package/dist/todos/projects.js.map +1 -1
- package/dist/topicTalkerMemory.d.ts +37 -0
- package/dist/topicTalkerMemory.d.ts.map +1 -0
- package/dist/topicTalkerMemory.js +61 -0
- package/dist/topicTalkerMemory.js.map +1 -0
- package/dist/topicTalkers.d.ts +123 -0
- package/dist/topicTalkers.d.ts.map +1 -0
- package/dist/topicTalkers.js +276 -0
- package/dist/topicTalkers.js.map +1 -0
- package/dist/types.d.ts +7 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/agentEnvironment.d.ts +23 -0
- package/dist/utils/agentEnvironment.d.ts.map +1 -1
- package/dist/utils/agentEnvironment.js +33 -1
- package/dist/utils/agentEnvironment.js.map +1 -1
- package/dist/utils/agentPlugin.d.ts +9 -3
- package/dist/utils/agentPlugin.d.ts.map +1 -1
- package/dist/utils/agentPlugin.js +13 -6
- package/dist/utils/agentPlugin.js.map +1 -1
- package/dist/utils/authorMark.d.ts +59 -0
- package/dist/utils/authorMark.d.ts.map +1 -0
- package/dist/utils/authorMark.js +86 -0
- package/dist/utils/authorMark.js.map +1 -0
- 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/claudeLimitSwitch.d.ts +5 -1
- package/dist/utils/claudeLimitSwitch.d.ts.map +1 -1
- package/dist/utils/claudeLimitSwitch.js +6 -2
- package/dist/utils/claudeLimitSwitch.js.map +1 -1
- package/dist/utils/claudeProfileUsageLines.d.ts +14 -2
- package/dist/utils/claudeProfileUsageLines.d.ts.map +1 -1
- package/dist/utils/claudeProfileUsageLines.js +78 -7
- 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 +22 -0
- package/dist/utils/claudeProfiles.d.ts.map +1 -1
- package/dist/utils/claudeProfiles.js +69 -0
- package/dist/utils/claudeProfiles.js.map +1 -1
- package/dist/utils/claudeUsage.d.ts +145 -51
- package/dist/utils/claudeUsage.d.ts.map +1 -1
- package/dist/utils/claudeUsage.js +211 -94
- 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 +36 -16
- package/dist/utils/fallbackChain.js.map +1 -1
- package/dist/utils/folderGit.d.ts +9 -0
- package/dist/utils/folderGit.d.ts.map +1 -0
- package/dist/utils/folderGit.js +33 -0
- package/dist/utils/folderGit.js.map +1 -0
- package/dist/utils/forwardedMark.d.ts +8 -0
- package/dist/utils/forwardedMark.d.ts.map +1 -1
- package/dist/utils/forwardedMark.js +2 -0
- package/dist/utils/forwardedMark.js.map +1 -1
- package/dist/utils/jsonStreamHost.d.ts +2 -1
- package/dist/utils/jsonStreamHost.d.ts.map +1 -1
- package/dist/utils/jsonStreamHost.js +4 -2
- package/dist/utils/jsonStreamHost.js.map +1 -1
- package/dist/utils/messageContext.d.ts +22 -7
- package/dist/utils/messageContext.d.ts.map +1 -1
- package/dist/utils/messageContext.js +19 -5
- package/dist/utils/messageContext.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/personLabel.d.ts +13 -0
- package/dist/utils/personLabel.d.ts.map +1 -0
- package/dist/utils/personLabel.js +15 -0
- package/dist/utils/personLabel.js.map +1 -0
- package/dist/utils/replyQuote.d.ts +17 -3
- package/dist/utils/replyQuote.d.ts.map +1 -1
- package/dist/utils/replyQuote.js +25 -2
- package/dist/utils/replyQuote.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/dist/utils/talkerAccess.d.ts +9 -0
- package/dist/utils/talkerAccess.d.ts.map +1 -0
- package/dist/utils/talkerAccess.js +20 -0
- package/dist/utils/talkerAccess.js.map +1 -0
- package/dist/utils/tmuxExec.d.ts +20 -8
- package/dist/utils/tmuxExec.d.ts.map +1 -1
- package/dist/utils/tmuxExec.js +27 -7
- package/dist/utils/tmuxExec.js.map +1 -1
- package/dist/utils/topicAccessScreenPlan.d.ts +253 -0
- package/dist/utils/topicAccessScreenPlan.d.ts.map +1 -0
- package/dist/utils/topicAccessScreenPlan.js +287 -0
- package/dist/utils/topicAccessScreenPlan.js.map +1 -0
- package/dist/utils/topicLabel.d.ts +12 -0
- package/dist/utils/topicLabel.d.ts.map +1 -0
- package/dist/utils/topicLabel.js +12 -0
- package/dist/utils/topicLabel.js.map +1 -0
- package/dist/utils/topicRequest.d.ts +8 -5
- package/dist/utils/topicRequest.d.ts.map +1 -1
- package/dist/utils/topicRequest.js +9 -7
- package/dist/utils/topicRequest.js.map +1 -1
- package/npm-shrinkwrap.json +1003 -0
- package/package.json +5 -3
- 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
package/SETUP.md
CHANGED
|
@@ -247,6 +247,15 @@ stopped; this is not confirmed on current WSL. If the bot stops after you log in
|
|
|
247
247
|
These settings apply to every surface. The Telegram ones — the bot token, the group and the DM, voice — are listed
|
|
248
248
|
under [Telegram environment variables](#telegram-environment-variables).
|
|
249
249
|
|
|
250
|
+
The agents (Claude, OpenCode, a terminal), a scheduled check, git in a bound folder, a sign-in and an install or update
|
|
251
|
+
the bot runs get the bot's environment WITHOUT its own secrets — `TELEGRAM_BOT_TOKEN` and `OPENCODE_PASSWORD`: an agent
|
|
252
|
+
reaches Telegram only through the bot's tools. Your other variables (provider keys, tool tokens your agents use for their
|
|
253
|
+
work) reach them as before. This keeps the two out of what agents print, log and install; it is no barrier against a
|
|
254
|
+
process that looks for them, since the agents run as the bot's own user, who can read its config file. Without
|
|
255
|
+
`TMUX_SOCKET_NAME` the agents run on your default tmux server, and the bot removes the two from that server's environment
|
|
256
|
+
before each agent session: a window or session you open there afterwards no longer inherits them (one already open keeps
|
|
257
|
+
what it has).
|
|
258
|
+
|
|
250
259
|
#### External Optional
|
|
251
260
|
|
|
252
261
|
| Variable | Default | Description |
|
|
@@ -266,8 +275,8 @@ your chosen providers need them.
|
|
|
266
275
|
|---|---|---|
|
|
267
276
|
| `WORK_ROOT` | `$PWD` | You cannot control the process cwd; normal launch uses `cd <projects-parent> && charness` |
|
|
268
277
|
| `OPENCODE_URL` | `http://localhost:4096` | You use a custom OpenCode port or external server; the port must differ per instance |
|
|
269
|
-
| `OPENCODE_USERNAME` | `opencode` | `OPENCODE_PASSWORD` is set
|
|
270
|
-
| `OPENCODE_PASSWORD` |
|
|
278
|
+
| `OPENCODE_USERNAME` | `opencode` | `OPENCODE_PASSWORD` is set and its user is not `opencode` |
|
|
279
|
+
| `OPENCODE_PASSWORD` | a random one per server start | You run the OpenCode server yourself with a password, or other tools of yours must reach the server the bot starts: the bot then starts it with this password instead of a random one (a change reaches a server the bot already runs at its next start). Without it the bot's server still requires a password — a new one each start, kept in `DATA_DIR/.opencode-server-credential` (readable by the bot's user only) — so no other account of the machine can drive the agents through it. A password-less `opencode serve` of the bot's user on the bot's port is stopped and replaced once no topic works in it: one an older bot left running, and also one you run yourself (only the bot's topics count, so a turn of yours in its TUI ends with it). To run your own server there, start it with `OPENCODE_SERVER_PASSWORD` and set `OPENCODE_PASSWORD` to the same value |
|
|
271
280
|
| `OPENCODE_ALLOW_REMOTE` | — | `OPENCODE_URL` intentionally points outside loopback |
|
|
272
281
|
| `OPENCODE_BIN` | (auto) | The `opencode` binary is not on PATH or you use a fork. Auto: the first `opencode` on PATH (on Windows with each `PATHEXT` extension — npm's `opencode.cmd` shim is run as the Node script it wraps, another `.cmd` / `.bat` through `cmd.exe`), else the copy the bot installed in `~/.npm-global` |
|
|
273
282
|
| `CLAUDE_BIN` | (auto) | The `claude` binary is not on PATH due to nvm/asdf/systemd PATH differences |
|
|
@@ -322,7 +331,7 @@ What it does depends on how this instance is installed — `/update` names the k
|
|
|
322
331
|
|
|
323
332
|
| Install | What the updater does |
|
|
324
333
|
|---|---|
|
|
325
|
-
| **npm global** (`npm install -g charness`, a prefix the bot's user can write) | Takes a new version from the registry **4 hours after the bot first saw it**, so a hastily fixed release never reaches you first; installs it with the `npm` beside the running `node`, runs `charness self-check` on the NEW install before switching, then restarts onto it. Never `sudo`. |
|
|
334
|
+
| **npm global** (`npm install -g charness`, a prefix the bot's user can write) | Takes a new version from the registry **4 hours after the bot first saw it**, so a hastily fixed release never reaches you first; installs it with the `npm` beside the running `node` — by the package's `npm-shrinkwrap.json`, so every dependency at the version that release was tested with (npm 12 ignores that file and resolves the ranges) —, runs `charness self-check` on the NEW install before switching, then restarts onto it. Never `sudo`. |
|
|
326
335
|
| **git checkout** (a clone, an `npm link`, the one the Docker container mounts) | Fast-forwards through `scripts/self-update.sh`, with no hold — a checkout follows `main` — and rebuilds. In hot mode the watcher reloads the worker by itself (a pull that changes no compiled source — docs, the CHANGELOG, scripts — rebuilds nothing, so the updater asks the worker to reload); when a file the hot supervisor loaded changed, the worker asks the supervisor to re-execute itself (same pid; the OpenCode server and the speech engine are left alone). |
|
|
327
336
|
| anything else — a read-only folder (a root-owned npm prefix), pnpm / yarn / bun, a project-local install, a Node without `process.execve` (needs 22.15+, not Windows), `npx` | Says that a new version is out and how to update by hand; `npx` gets nothing to update. |
|
|
328
337
|
|
|
@@ -389,11 +398,12 @@ agents can send such commands there with `charness remote-run`: output, exit cod
|
|
|
389
398
|
had run locally. Without a runner nothing changes for anyone, and agents are not told of the command.
|
|
390
399
|
|
|
391
400
|
**Pair it (the normal way).** Needs this machine's ordinary `sshd` (key login on) with an address the runner can reach — nothing else is
|
|
392
|
-
opened or changed, no root, no VPN — and on the runner machine
|
|
401
|
+
opened or changed, no root, no VPN — and on the runner machine `ssh`, `tar`, `curl` or `wget`, and a way to reach nodejs.org (no Node.js needed: the pairing installs the runner its own). In General send `/runners` → **+ Pair a new
|
|
393
402
|
runner**; the first time the bot asks which address runners dial (the `runnerHost` row of the [instance settings](#instance-settings-settingsjson)) and
|
|
394
|
-
proposes the public address it finds. It posts
|
|
395
|
-
runner machine
|
|
396
|
-
in one go
|
|
403
|
+
proposes the public address it finds. It posts ONE line (valid 10 minutes, single use) with the words that explain it: pasted in an admin account's terminal
|
|
404
|
+
on the runner machine it pairs a standard user there (`runner` unless you change the last word of the line) and installs its always-on service
|
|
405
|
+
in one go; without admin rights, the same line run from the terminal of that account itself (without its leading `sudo`, its last word being that
|
|
406
|
+
account's name) pairs it only, with `charness-runner service install` afterwards to keep it running. An
|
|
397
407
|
instance without Telegram uses `charness runners pair --host host.example`. The steps, the services (a Mac that stays on while logged out), removing and the safety
|
|
398
408
|
model: [docs/remote-run.md](docs/remote-run.md#pair-a-runner).
|
|
399
409
|
|
|
@@ -480,12 +490,18 @@ visible topic list, per-topic names/icons, quick agent switching — but it is
|
|
|
480
490
|
</p>
|
|
481
491
|
|
|
482
492
|
The group **id is automatic** — leave `ALLOWED_GROUP_ID` empty and the bot
|
|
483
|
-
auto-pairs with the first forum supergroup
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
**
|
|
487
|
-
|
|
488
|
-
|
|
493
|
+
auto-pairs with the first forum supergroup it is talked to from (the `-100…` id
|
|
494
|
+
is saved to `state.json`; re-point later with `/pair`). Anyone can make a group,
|
|
495
|
+
add your bot and be its creator, so who may pair is limited: with
|
|
496
|
+
`OWNER_USER_ID` set, **only you** — the bot pairs a group only from your message
|
|
497
|
+
there, and `/pair` from anyone else is refused; without it, the first group an
|
|
498
|
+
admin talks to the bot from is paired, and after that only the **creator of the
|
|
499
|
+
group it serves** can move it with `/pair`. To pin a specific id by hand, set
|
|
500
|
+
`ALLOWED_GROUP_ID` to the numeric value (a group **name** is not accepted) —
|
|
501
|
+
that also disables auto-pairing (the safest choice when the bot is reachable by
|
|
502
|
+
others: BotFather's **Allow Groups** off does the same for every new group).
|
|
503
|
+
**Access control:** whoever is a creator/administrator of that group may drive
|
|
504
|
+
the bot — there is no separate allow-list.
|
|
489
505
|
|
|
490
506
|
**To use the DM instead (or as well):** **[manual]** send `/start` to
|
|
491
507
|
[@userinfobot](https://t.me/userinfobot) for your numeric user id, then add it
|
|
@@ -633,7 +649,7 @@ a hand edit applies to the next session start, no restart.
|
|
|
633
649
|
| `defaultEffort` | The reasoning effort of every topic that has no `/effort` pick of its own: `low`, `medium`, `high`, `xhigh`, `max`, `auto` or `ultracode`. Set it from **`/effort` in the General topic** (a tap writes the file), or by hand. Leave it out and the built-in default, `medium`, applies |
|
|
634
650
|
| `autoUpdate` | What the instance does about a new charness version: `on` installs it by itself when the bot is idle, `notify` says it is out and offers a button, `off` never looks. Set it from **`/update` in General**, or by hand. Leave it out and `on` applies ([Updating](#updating)) |
|
|
635
651
|
| `whatsNew` | `true` (default): after an update General lists the CHANGELOG entries it brought; `false`: only the «Updated a → b» line. Set from `/update` in General, or by hand |
|
|
636
|
-
| `botSkills` | Whether the skills Charness ships with its agents (`charness-
|
|
652
|
+
| `botSkills` | Whether the skills Charness ships with its agents (`charness-orchestration`, `charness-delivery-loop`, the two delegate skills) and the hint to load the orchestration skill reach them ([Commands](docs/commands.md#skills-the-bot-gives-its-agents)): `"on"` or `"off"`. The default of an instance whose **General** never chose — a Jira-only instance, which has no General, sets it here; `/bot_skills` in General overrides it for the instance once used; leave it out and `on` applies. A running agent keeps its skills until its next start |
|
|
637
653
|
| `taskAgents` | The cap on tracker task agents ([Jira setup](#jira-setup)): `{ "maxConcurrent": 5 }` — how many conversations of a connected tracker (Jira issues) may work on a hand-over at once, for the whole bot; an issue over it waits in a queue and starts by itself. `0` = no limit, 100 the most. The default of an instance whose **General** never chose — a Jira-only instance, which has no General, sets it here; **`/task_agents` in General** overrides it for the instance once used (a picker, or any number typed after the command). Leave it out and `5` applies |
|
|
638
654
|
| `todo` | The shared todo lists ([Commands](docs/commands.md#shared-todo-lists)): `{ "isEnabled": true, "reminderMinutes": 60 }`. `isEnabled: false` turns the feature off (agents are not offered the tools); `reminderMinutes` is how long an agent may work without updating its list before it is reminded, `0` = never. Set both from **`/todo` in General → Settings**, or by hand — the way for an instance without a General topic (a Jira-only one). Leave it out and on / 60 apply |
|
|
639
655
|
| `runnerHost` | The address paired runners dial to reach this machine's ssh server: `{ "host": "203.0.113.5", "port": 22 }`. **`/runners` in General** asks for it the first time you pair a machine (proposing this machine's public address when it answers with its own ssh key) and keeps it; it can be edited by hand. Leave it out and `/runners` asks again |
|
|
@@ -700,20 +716,33 @@ can't be matched from their messages, so post non-anonymously. The DM surface
|
|
|
700
716
|
(when enabled) is gated separately: only the configured `OWNER_USER_ID` may
|
|
701
717
|
talk to the bot there.
|
|
702
718
|
|
|
703
|
-
|
|
704
|
-
|
|
719
|
+
**Who is who.**
|
|
720
|
+
|
|
721
|
+
| Role | Who | What they may do |
|
|
722
|
+
|---|---|---|
|
|
723
|
+
| **Owner** | `OWNER_USER_ID` | The DM surface. In the group the owner is an admin like any other. |
|
|
724
|
+
| **Admin** | Creator or administrator of the served group | Everything, in every topic — **including shell commands on the host** (below). Manages talkers with `/access`. |
|
|
725
|
+
| **Talker** | A member an admin added to ONE topic's list (or to General's, which is group-wide) | Talks to the agent in that topic only: text, voice notes, files, albums, answers to the agent's questions, and `/esc`, `/status`, `/whoami`, `/help`. Every other command, picker and wizard is refused. |
|
|
726
|
+
| **Anyone else** | Other members, strangers | Ignored, silently. |
|
|
727
|
+
|
|
728
|
+
**Letting someone talk in one topic without making them an admin** is `/access` (admins only, see [the command](docs/commands.md#access)): tap someone who wrote in the topic, reply to their message with `/access add`, or `/access add @username` — each grant shows the warning below before it takes effect. The lists live in `state.json`; a person who leaves the group loses every entry. A talker is **not** a read restriction: everyone in the group still READS every topic (Telegram has no per-topic read rights) — remove a person from the group to stop that.
|
|
729
|
+
|
|
730
|
+
> **Security model — group admin (or the DM owner) ⇒ shell on the host; a talker ⇒ the same, in their topic's folder.**
|
|
731
|
+
> The agents run with permission checks disabled (`--dangerously-skip-permissions` for Claude,
|
|
705
732
|
> auto-approve for OpenCode) and `/terminal` opens a raw `$SHELL` in the bound
|
|
706
733
|
> folder, so anyone who can talk to the bot can execute arbitrary commands as
|
|
707
|
-
> the bot's OS user.
|
|
708
|
-
>
|
|
734
|
+
> the bot's OS user. **An admin can do everything.** **A talker can make the agent run any command in that
|
|
735
|
+
> topic's folder** (never in a raw-shell topic, and their words reach the agent marked as theirs, so the agent
|
|
736
|
+
> can tell them from you — but that is a guard, not a sandbox). Only promote or add people you would trust with SSH
|
|
737
|
+
> access to that machine, and keep the served group itself private.
|
|
709
738
|
|
|
710
739
|
#### External Optional (Telegram)
|
|
711
740
|
|
|
712
741
|
| Variable | Default | Description |
|
|
713
742
|
|---|---|---|
|
|
714
|
-
| `ALLOWED_GROUP_ID` | (auto-pair) | Numeric forum supergroup id (`-100…`). Leave empty to auto-pair with the first forum group a group **admin/creator** contacts the bot from (id is saved to `state.json`; re-point with `/pair`). A **name** is not accepted. A numeric value disables auto-pairing |
|
|
743
|
+
| `ALLOWED_GROUP_ID` | (auto-pair) | Numeric forum supergroup id (`-100…`). Leave empty to auto-pair: with `OWNER_USER_ID` set, with the first forum group the **owner** writes in; without it, with the first forum group a group **admin/creator** contacts the bot from (id is saved to `state.json`; re-point with `/pair` — the owner only, or without one the creator of the group served now). A **name** is not accepted. A numeric value disables auto-pairing |
|
|
715
744
|
| `CHAT_MODE` | `both` | Which surface(s) this instance serves: `group`, `dm`, or `both` — see [Two surfaces](docs/backends.md#two-surfaces-group-topics-bot-dm-or-both) |
|
|
716
|
-
| `OWNER_USER_ID` | — | **Optional.** Numeric Telegram user id of the owner — leave it unset to run group-only (the DM surface stays inert; a group works fully without it). Set it
|
|
745
|
+
| `OWNER_USER_ID` | — | **Optional.** Numeric Telegram user id of the owner — leave it unset to run group-only (the DM surface stays inert; a group works fully without it). Set it to enable the owner-DM surface (**required** for `CHAT_MODE=dm`); with it set, the owner is also the only person who may pair the bot with a group (auto-pairing and `/pair`) |
|
|
717
746
|
|
|
718
747
|
**Localized in 12 languages** — the bot UI (commands, buttons, notices) speaks
|
|
719
748
|
中文, English, Français, ქართული, Deutsch, हिन्दी, 日本語, Português, Русский,
|
|
@@ -742,8 +771,8 @@ connector behaves is described in [`src/connectors/jira/README.md`](src/connecto
|
|
|
742
771
|
1. Create a Jira account for the AI (its API token is the instance's only secret) and note its account id.
|
|
743
772
|
2. Recommended: create or choose a Jira group of the people whose words may steer the AI (for example
|
|
744
773
|
`ai-trusted`), and give the AI account the *Browse users and groups* global permission so that it can read
|
|
745
|
-
the group. Then the agent reads only the text and files of its members and of
|
|
746
|
-
and only their hand-overs start it.
|
|
774
|
+
the group. Then the agent reads only the text and files of its members and of the apps you list in
|
|
775
|
+
`trustedApps` (step 4), and only their hand-overs start it.
|
|
747
776
|
3. An instance of its own: a `DATA_DIR`, a `WORK_ROOT` with one folder per project, a private tmux server, and
|
|
748
777
|
an env file that is the ONLY configuration it reads:
|
|
749
778
|
|
|
@@ -770,6 +799,7 @@ connector behaves is described in [`src/connectors/jira/README.md`](src/connecto
|
|
|
770
799
|
"PROJ": { "folder": "proj", "triggerStatuses": ["In Progress"], "extraFields": ["customfield_10042"] }
|
|
771
800
|
},
|
|
772
801
|
"trustedGroup": "ai-trusted",
|
|
802
|
+
"trustedApps": ["<an app account's id>"],
|
|
773
803
|
"wakeOnMention": true,
|
|
774
804
|
"pollIntervalSeconds": 30,
|
|
775
805
|
"runBudgetPer24h": 5,
|
|
@@ -784,12 +814,28 @@ connector behaves is described in [`src/connectors/jira/README.md`](src/connecto
|
|
|
784
814
|
members again whenever its last read is older than 5 minutes: a removed member loses the AI's trust within
|
|
785
815
|
that time. List only projects where only your team can write, and where no automation acts on text or
|
|
786
816
|
actions from outside it — an e-mail handler, a portal form, a copy from another project, a rule that
|
|
787
|
-
hands an issue to the AI when someone outside the team acts:
|
|
788
|
-
are trusted, so such a rule brings that outside text, or that person's
|
|
817
|
+
hands an issue to the AI when someone outside the team acts: the text and hand-over of an app or automation
|
|
818
|
+
you trust (see `trustedApps` below) are trusted, so such a rule brings that outside text, or that person's
|
|
819
|
+
hand-over, to the agent. Nor list a
|
|
789
820
|
project where anyone outside the team holds the *Edit all comments* permission: Jira Cloud keeps no history
|
|
790
821
|
of a comment's edits, so a comment is judged by its author and its LAST editor only — an outsider's edit of a
|
|
791
822
|
member's comment, followed by a member's own edit, reads as trusted.
|
|
792
823
|
|
|
824
|
+
`trustedApps` (optional, needs `trustedGroup`) is a list of Jira **account ids of app accounts** — the
|
|
825
|
+
integrations and automations (`accountType` `app`) whose text may steer the agent and whose hand-over may
|
|
826
|
+
start it. The group of a site often holds dozens of app users (chat, mail, error-tracking and help-desk
|
|
827
|
+
integrations) that can relay text written by outsiders into an issue, so with the key set an app is trusted
|
|
828
|
+
only when its id is listed — being a member of the group is not enough — and any other app is treated exactly
|
|
829
|
+
like a person outside the group: its text is withheld, its hand-over starts nothing, its mention is ignored.
|
|
830
|
+
`[]` trusts no app. Each app that is not listed is written to the log once, the first time it acts on an issue,
|
|
831
|
+
with its name and account id (`[jira] app "<name>" (account id "<id>") is not in trustedApps: …`), so you can
|
|
832
|
+
copy the ids to trust from there. To find an app's id beforehand, search the site's users by the app's name
|
|
833
|
+
(`GET /rest/api/3/user/search?query=<name>` answers each match's `accountId` and `accountType`, an app's is
|
|
834
|
+
`app`) or look it up in the admin user list; `GET /rest/api/3/user?accountId=<id>` confirms an id you hold.
|
|
835
|
+
Absent, every app is trusted as before, and the start logs one warning that names the key; with no
|
|
836
|
+
`trustedGroup` the key is refused — without a group everyone is trusted anyway. A listed id adds no trust
|
|
837
|
+
to a person's account: people stay trusted by membership alone.
|
|
838
|
+
|
|
793
839
|
`wakeOnMention` (optional) decides whether an @-mention of the AI account in a comment wakes it to answer
|
|
794
840
|
only, without the issue being handed over; absent, it is on exactly when `trustedGroup` is set, and `true`
|
|
795
841
|
without a group is refused — without one, anyone who can comment could start the AI.
|
|
@@ -828,7 +874,7 @@ connector behaves is described in [`src/connectors/jira/README.md`](src/connecto
|
|
|
828
874
|
The start refuses a missing `ENV_FILE`, `TMUX_SOCKET_NAME` or `jira.json`, an `OPENCODE_URL` on the default
|
|
829
875
|
port, a `TELEGRAM_BOT_TOKEN` or any `ATLASSIAN_*` variable when Telegram is off, a token that belongs to
|
|
830
876
|
another account, an unknown project or status, a `trustedGroup` the site does not have or the AI account
|
|
831
|
-
may not read, and a `DATA_DIR` holding another surface's state. An unreachable Jira does not refuse the start —
|
|
877
|
+
may not read, a `trustedApps` without a `trustedGroup`, and a `DATA_DIR` holding another surface's state. An unreachable Jira does not refuse the start —
|
|
832
878
|
polling backs off and resumes.
|
|
833
879
|
|
|
834
880
|
The agent sessions of a Jira instance run without the user-level Claude settings, hooks and skills, with the
|
package/agent-plugin/README.md
CHANGED
|
@@ -5,7 +5,8 @@ conversations, Claude Code and OpenCode. The operator's own sessions outside the
|
|
|
5
5
|
|
|
6
6
|
| Skill | What it is for |
|
|
7
7
|
|-------|----------------|
|
|
8
|
-
| `charness-
|
|
8
|
+
| `charness-orchestration` | An ADD-ON to a manager skill, not a second manager: what the bot adds when an agent orchestrates detached workers — the watch check that fires when a worker exits, stalls OR runs 2 h 30 min without a report (`schedule_create` + `checkCommand`), ending the turn between wakes, accounts through `claude_profiles`, talking to the user through the bot's tools, a tracker conversation, cleaning runner copies. It holds no delivery loop and is loaded together with the session's general manager skill |
|
|
9
|
+
| `charness-delivery-loop` | The FALLBACK manager: a small delivery loop (modes, the finish step, parallel work in worktrees, the queue, briefing). Loaded only when the session lists no other manager skill — a public user's session, or an OpenCode one, which does not read `.claude/skills` |
|
|
9
10
|
| `charness-delegate-claude` | Launching, watching and resuming a detached `claude -p` worker (`summarize-events.py` reads its event log) |
|
|
10
11
|
| `charness-delegate-opencode` | The same for `opencode run` |
|
|
11
12
|
|
|
@@ -13,23 +14,31 @@ conversations, Claude Code and OpenCode. The operator's own sessions outside the
|
|
|
13
14
|
|
|
14
15
|
- **Claude Code:** every bot launch of an agent session (json-stream and tmux, start and resume) carries
|
|
15
16
|
`--plugin-dir <package>/agent-plugin`. Claude Code namespaces plugin skills by the plugin name and the skill's
|
|
16
|
-
FOLDER: `charness:charness-
|
|
17
|
+
FOLDER: `charness:charness-orchestration`. `--setting-sources project,local` (a Jira session) does not drop them.
|
|
17
18
|
- **OpenCode:** the `opencode serve` the bot starts gets `OPENCODE_CONFIG_DIR=<DATA_DIR>/opencode-config`, a
|
|
18
19
|
bot-owned folder whose `skills` is a symlink to this folder's `skills/`. OpenCode adds those skills to the
|
|
19
20
|
project's and the user's own; it writes files (`.gitignore`) into that folder, which is why it is not this
|
|
20
21
|
folder. An operator who set `OPENCODE_CONFIG_DIR` keeps it, and OpenCode topics then go without these skills.
|
|
21
22
|
- **Switched off:** the «Bot skills» switch (`/bot_skills`, `botSkills` in `settings.json`; `src/utils/botSkills.ts`) drops
|
|
22
|
-
the `--plugin-dir` of a Claude conversation at its next start or resume, and the hint to load `charness-
|
|
23
|
+
the `--plugin-dir` of a Claude conversation at its next start or resume, and the hint to load `charness-orchestration` from the
|
|
23
24
|
bot MCP's instructions; the OpenCode server follows the instance value only (replaced at the bot's next start).
|
|
24
25
|
|
|
25
26
|
## Rules for a skill here
|
|
26
27
|
|
|
27
28
|
- Folder name = frontmatter `name` = `charness-<role>`. OpenCode has no namespaces: a skill named like a
|
|
28
29
|
project's or user's own one (`manager`) would replace it there.
|
|
29
|
-
-
|
|
30
|
-
|
|
30
|
+
- **Policy belongs to the general skills, the bot's mechanics to these.** A manager or delegate skill of the
|
|
31
|
+
project or the user owns the delivery policy (the loop, review, parallel work, the queue, finishing, the model and
|
|
32
|
+
effort per role); the skills here own only how the bot launches, detaches, watches and wakes, which account to take,
|
|
33
|
+
and how to reach the user. So `charness-orchestration` and the two delegate skills are add-ons — each says it wins only on
|
|
34
|
+
those mechanics — and never tell an agent to use them INSTEAD of another manager. `charness-delivery-loop` is the
|
|
35
|
+
fallback for a session with no general manager skill and is never loaded beside one; the role defaults of the delegate
|
|
36
|
+
skills sit under a heading «only when no general delegate skill is listed».
|
|
37
|
+
- The watch recipe in `charness-orchestration` is the `workerWatchCheckCommand` constant of
|
|
38
|
+
`src/scheduler/workerWatch.ts` verbatim, with its cron and its status arguments (the bot posts the
|
|
31
39
|
topic's status line; a unit test holds them equal), and every bot tool a skill names must exist on the bot's MCP surface.
|
|
32
40
|
- Written for this public repository: no real ids, paths or names. The shared rules repository keeps its own
|
|
33
|
-
`manager`; a change wanted in both is ported by hand
|
|
41
|
+
`manager`; a change wanted in both is ported by hand — into `charness-delivery-loop` for the loop, into
|
|
42
|
+
`charness-orchestration` for a bot mechanic.
|
|
34
43
|
- Shipped in the npm package (`files`); a commit that touches only this folder still counts as a release change.
|
|
35
44
|
A Claude session reads a new version at its next start, OpenCode when it next creates the folder's instance.
|
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: charness-delegate-claude
|
|
3
|
-
description: "In a Charness-run session, use to launch, watch, finish and resume a builder, reviewer, investigator or planner as a detached `claude -p` process instead of an in-process sub-agent: the account from claude_profiles, the role's model and effort, a full-privilege worker with deny rules, its event log, the bot watch check, resuming the same session. Load charness-
|
|
3
|
+
description: "In a Charness-run session, use to launch, watch, finish and resume a builder, reviewer, investigator or planner as a detached `claude -p` process instead of an in-process sub-agent: the account from claude_profiles, the role's model and effort, a full-privilege worker with deny rules, its event log, the bot watch check, resuming the same session. Load charness-orchestration first."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Detached Claude Code worker (Charness session)
|
|
7
7
|
|
|
8
8
|
A worker is `claude -p`: one turn per process, the conversation kept between runs by its session id. Load
|
|
9
|
-
`charness-
|
|
9
|
+
`charness-orchestration` first — it holds the watch check this skill arms (the delivery loop is in the session's
|
|
10
|
+
general manager skill, else in `charness-delivery-loop`). A general delegate skill keeps the role policy (model and
|
|
11
|
+
effort per role); this one wins on the launch, the account, detaching and the watch.
|
|
10
12
|
|
|
11
13
|
## Account, model, effort
|
|
12
14
|
|
|
13
15
|
- New worker: call `claude_profiles` with the worker's model and no `currentProfile`. Start the worker with
|
|
14
16
|
`CLAUDE_CONFIG_DIR=<configDir>` of the `recommended` profile (nothing when its `configDir` is null); without it
|
|
15
|
-
the worker drains YOUR account. The bot picks the
|
|
17
|
+
the worker drains YOUR account. The bot picks it from the operator's /limits auto-switch list: take it without asking.
|
|
16
18
|
- `recommended: null`: no account is usable now. Do not launch; `schedule_create` with `onceAt` = `nextAvailable.at`
|
|
17
19
|
and a prompt that stands on its own (plan path, scope, what to launch), then end the turn. If `nextAvailable` is
|
|
18
20
|
null too, no account names a time it frees up: ask the user a native question (nothing can run, no time known) and
|
|
19
21
|
`schedule_create` a one-off retry about 30 minutes ahead, with such a prompt.
|
|
20
22
|
- Confirm the login under that directory: `env -u ANTHROPIC_API_KEY claude auth status --text`.
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
- The first `system`/`init` event must name the requested model; on a mismatch stop the worker and tell the user.
|
|
24
|
+
|
|
25
|
+
### Role defaults — only when no general delegate skill is listed
|
|
26
|
+
|
|
27
|
+
Unless the user names others:
|
|
28
|
+
|
|
29
|
+
- builder (code, tests, debugging, live runs): `--model sonnet --effort xhigh`;
|
|
30
|
+
- investigator (a cause still unclear after a builder failed on it twice): `--model opus --effort high`;
|
|
31
|
+
- reviewer: `--model opus --effort high`; a small or mechanical diff (docs, tests only): `--effort medium`;
|
|
32
|
+
- planner and the research feeding a plan: `--model opus --effort high`, `xhigh` for a large feature.
|
|
26
33
|
- Never Sonnet for work on data persistence (storage, DB schema and migrations, sync, merge and conflict
|
|
27
34
|
resolution, backups — anything that can lose or corrupt user data): every role runs on Opus, a builder at
|
|
28
35
|
`--model opus --effort xhigh` (`max` for a deep investigation). This beats the role defaults above.
|
|
29
36
|
- Never Fable for a worker: it drains the shared session and weekly limits fastest.
|
|
30
|
-
- The first `system`/`init` event must name the requested model; on a mismatch stop the worker and tell the user.
|
|
31
37
|
|
|
32
38
|
## Launch
|
|
33
39
|
|
|
34
|
-
1. Make a private run directory
|
|
35
|
-
the task and its context (the worker does not see this
|
|
36
|
-
resource another live process holds, and "report every
|
|
40
|
+
1. Make a private run directory (an absolute path: a resume starts from the checkout), generate a UUID for the
|
|
41
|
+
session, write the brief into `<run-dir>/brief.md`: the task and its context (the worker does not see this
|
|
42
|
+
conversation), the skills it must load by name, every resource another live process holds, and "report every
|
|
43
|
+
changed file and how you verified".
|
|
37
44
|
2. Run it in the target checkout:
|
|
38
45
|
|
|
39
46
|
```bash
|
|
@@ -45,6 +52,7 @@ setsid nohup env -u ANTHROPIC_API_KEY CLAUDE_CONFIG_DIR="<configDir>" \
|
|
|
45
52
|
--output-format stream-json --verbose --include-partial-messages \
|
|
46
53
|
< "<run-dir>/brief.md" > "<run-dir>/events.jsonl" 2> "<run-dir>/stderr.log" &
|
|
47
54
|
echo $! > "<run-dir>/pid"
|
|
55
|
+
printf '%s\n' "<uuid>" > "<run-dir>/session"
|
|
48
56
|
```
|
|
49
57
|
|
|
50
58
|
- Leave out `CLAUDE_CONFIG_DIR=…` for the default profile.
|
|
@@ -54,12 +62,16 @@ echo $! > "<run-dir>/pid"
|
|
|
54
62
|
ends; `BASH_MAX_TIMEOUT_MS` lets one foreground command run up to 2 hours. Longer work → split it.
|
|
55
63
|
- Full privileges with deny rules, never a restricted allowlist: a refused ordinary command ends the worker's
|
|
56
64
|
turn early.
|
|
57
|
-
- A checkout below the folder that holds `.claude/skills` does not see those skills
|
|
65
|
+
- A checkout below the folder that holds `.claude/skills` does not see those skills, nor does a worker started above
|
|
66
|
+
it (skills in a subfolder of the checkout, e.g. a repository root whose agents work in one of its folders): add
|
|
58
67
|
`--add-dir "<that folder>"` and check that the `init` event's `skills` lists every skill the brief names.
|
|
59
68
|
3. Check the PID: `ps -o args= -p "$(cat "<run-dir>/pid")"` must show `claude -p … <uuid>`. If it does not (the CLI
|
|
60
|
-
handed over to a new process), take
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
handed over to a new process), take the newest match, `pgrep -n -f "^claude -p .*<uuid>"`, and write that one PID
|
|
70
|
+
into the pid file. `$!` is often the wrapper shell that started it, gone a moment later: wait about 2 seconds after
|
|
71
|
+
the launch, check, and never arm the watch on a PID this check has not confirmed. Neither finds it → the worker
|
|
72
|
+
died at start: read `stderr.log` and the log, fix the cause and relaunch.
|
|
73
|
+
4. Record the UUID (it is in `<run-dir>/session`), the profile name you launched on, the checkout and the run directory
|
|
74
|
+
in the plan, then arm the watch check from `charness-orchestration` with this PID and run directory.
|
|
63
75
|
|
|
64
76
|
## Watch and finish
|
|
65
77
|
|
|
@@ -72,11 +84,18 @@ echo $! > "<run-dir>/pid"
|
|
|
72
84
|
## Resume
|
|
73
85
|
|
|
74
86
|
- Confirm the old PID is gone, then repeat the launch with `--resume "<uuid>"` instead of `--session-id`, a new
|
|
75
|
-
brief and new log files (`events-2.jsonl`, …),
|
|
87
|
+
brief and new log files (`events-2.jsonl`, …), `touch "<run-dir>/watch-armed"` (the run directory is reused, so the
|
|
88
|
+
marker of the first run is old) and arm a new check. Never `--continue` or `--fork-session`.
|
|
89
|
+
- Start it in the SAME checkout as the first run, in the same command: `cd "<checkout>" && setsid nohup …`. Your
|
|
90
|
+
shell's working folder may have been reset since, and elsewhere the CLI may not find the session or loads another
|
|
91
|
+
folder's rules. `$!` is then the shell running that line at best: the PID check of step 3 applies. Check that the
|
|
92
|
+
new `init` event's `cwd` is the checkout; another folder → stop the worker and resume it from the checkout.
|
|
93
|
+
- `<uuid>` comes only from `<run-dir>/session` or the `session_id` of the first (`system`/`init`) event of the first
|
|
94
|
+
run's log — never from memory or a shortened prefix.
|
|
76
95
|
- Keep the model, effort and flags of the first run.
|
|
77
96
|
- The account: call `claude_profiles` with `currentProfile` = the profile name recorded at launch; the worker stays on
|
|
78
97
|
it unless it can no longer run. Launch under the `recommended` profile's `configDir`, record that name.
|
|
79
|
-
- A run rejected on a usage limit ("You've hit your session limit"): call `claude_profiles` with `currentProfile` and
|
|
98
|
+
- A run rejected on a usage limit ("You've hit your session limit", "Credit balance is too low"): call `claude_profiles` with `currentProfile` and
|
|
80
99
|
`isStoppedByLimit: true`, and resume the SAME session at once under the `recommended` profile — never wait while an
|
|
81
100
|
account is usable. `recommended: null` → `schedule_create` with `onceAt` = `nextAvailable.at` and a prompt that
|
|
82
101
|
stands on its own (resume this session, call `claude_profiles` again); `nextAvailable` null too → ask the user a
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: charness-delegate-opencode
|
|
3
|
-
description: "In a Charness-run session, use to launch, watch, finish and resume a builder, reviewer or researcher as a detached `opencode run` process instead of an in-process sub-agent: model and variant, deny rules, its JSON event log, the bot watch check, resuming the same session. Load charness-
|
|
3
|
+
description: "In a Charness-run session, use to launch, watch, finish and resume a builder, reviewer or researcher as a detached `opencode run` process instead of an in-process sub-agent: model and variant, deny rules, its JSON event log, the bot watch check, resuming the same session. Load charness-orchestration first."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Detached OpenCode worker (Charness session)
|
|
7
7
|
|
|
8
8
|
A worker is `opencode run`: it exits when its turn goes idle and keeps the session for a later run. Load
|
|
9
|
-
`charness-
|
|
9
|
+
`charness-orchestration` first — it holds the watch check this skill arms (the delivery loop is in the session's
|
|
10
|
+
general manager skill, else in `charness-delivery-loop`). A general delegate skill keeps the role policy (model and
|
|
11
|
+
variant per role); this one wins on the launch, detaching and the watch.
|
|
10
12
|
|
|
11
13
|
## Model and variant
|
|
12
14
|
|
|
13
|
-
- The model and variant the user named; otherwise the
|
|
14
|
-
|
|
15
|
+
- The model and variant the user named; otherwise the role defaults of a general delegate skill, when the session lists
|
|
16
|
+
one; otherwise the ones this conversation runs on. `opencode models` lists what the configured providers offer — pick
|
|
17
|
+
a listed model and a variant it supports.
|
|
15
18
|
|
|
16
19
|
## Launch
|
|
17
20
|
|
|
@@ -38,7 +41,7 @@ echo $! > "<run-dir>/pid"
|
|
|
38
41
|
`pgrep -n -f "opencode.* run .*--title <scope>"` (a launcher may run the binary as a child: two matches), and
|
|
39
42
|
write that one PID into the pid file — the watch fires "worker exited" at once on a PID that is not the worker.
|
|
40
43
|
4. Record the session id — the top-level `sessionID` of the first JSON event in `events.jsonl` — with the
|
|
41
|
-
checkout and run directory in the plan, then arm the watch check from `charness-
|
|
44
|
+
checkout and run directory in the plan, then arm the watch check from `charness-orchestration` with this PID and
|
|
42
45
|
run directory.
|
|
43
46
|
|
|
44
47
|
## Watch and finish
|
|
@@ -61,7 +64,8 @@ jq -r 'select(.type=="tool_use" or .type=="text") |
|
|
|
61
64
|
## Resume
|
|
62
65
|
|
|
63
66
|
- Confirm the old PID is gone, then repeat the launch with `--session "<session-id>"`, a new brief and new log
|
|
64
|
-
files (`events-2.jsonl`, …),
|
|
67
|
+
files (`events-2.jsonl`, …), `touch "<run-dir>/watch-armed"` (the run directory is reused, so the marker of the first
|
|
68
|
+
run is old) and arm a new check. Keep the checkout, model and variant. Never `--continue` or `--fork`.
|
|
65
69
|
- A turn stopped by a provider's usage limit: resume the same session with another provider's model whose
|
|
66
70
|
context window holds the session.
|
|
67
71
|
- To stop a worker: confirm the PID is that worker (`ps -o args= -p <pid>`), `kill -TERM <pid>`, confirm it is
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: charness-delivery-loop
|
|
3
|
+
description: "Only when this session lists NO other manager skill (neither the project's nor the user's own): a small built-in delivery loop for orchestrating detached workers — modes, builder and reviewer roles, the finish step, parallel work in worktrees, the queue, briefing. In a Charness-run session load it together with `charness-orchestration`, which holds the bot's tools. A general manager skill is listed → follow that one and do not load this."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Delivery loop (the fallback manager)
|
|
7
|
+
|
|
8
|
+
You orchestrate: workers build, test, review and commit; you decide, keep the plan honest and keep the user
|
|
9
|
+
informed. You never write product code and never review a diff yourself. The bot's mechanics (launching, the watch
|
|
10
|
+
check, accounts, reaching the user) are in `charness-orchestration`; this skill is only the loop.
|
|
11
|
+
|
|
12
|
+
## Modes
|
|
13
|
+
|
|
14
|
+
- **autonomous** — the default for a scheduled or unattended run, or when the user says so. Drive a READY plan
|
|
15
|
+
(no draft marker, no open questions); ask nothing; decide from the plan and the project rules; stop and report
|
|
16
|
+
what you cannot resolve. Without a named plan pick one ready plan that a worker can finish alone (the oldest by
|
|
17
|
+
its file date); none → say "nothing to do" and stop.
|
|
18
|
+
- **interactive** — the user is talking to you. Answer their question first, decide every point yourself and list
|
|
19
|
+
the decisions for them to correct, ask only about a fork you could not resolve.
|
|
20
|
+
|
|
21
|
+
## Rules that never bend
|
|
22
|
+
|
|
23
|
+
- Never force-push, tag, bump a version or merge a merge request.
|
|
24
|
+
- You check a worker's result only through another agent's report, `git log`, `git show --stat` and the plan's
|
|
25
|
+
checkboxes — never by reading its code, running its tests or re-running its e2e yourself.
|
|
26
|
+
- A change the user can see is done only with a real end-to-end test that ran and passed. Never accept a stub, a
|
|
27
|
+
lower-level substitute or "test debt".
|
|
28
|
+
- Your own bookkeeping commits (a plan edit, a recorded decision) need no approval, in either mode; workers
|
|
29
|
+
commit their own work.
|
|
30
|
+
|
|
31
|
+
## Parallel work and the queue
|
|
32
|
+
|
|
33
|
+
- Reviewers and researchers run without limit alongside everything else: they only read.
|
|
34
|
+
- Builders: each separately released task — one that could be reviewed, merged or reverted on its own; every separate
|
|
35
|
+
ask in the queue counts, even when the project ships one release a day — gets its own git worktree and branch, named
|
|
36
|
+
in its brief; the builder commits only there. A lone task, or the scopes of ONE plan or task, works on the current
|
|
37
|
+
checkout. Two tasks touching the same file queue.
|
|
38
|
+
- Serialize what shares state: builds, test runs (devices, ports, e2e lanes — through their locks) and commits
|
|
39
|
+
(one at a time, path-limited). Two workers never share a file, a port, a browser profile or a device at once.
|
|
40
|
+
- Every new ask joins the queue the moment it is said; start it at once when nothing it needs is taken, else tell
|
|
41
|
+
the user its place. A long run never holds the queue: while a worker waits on a long run (a full suite, a remote
|
|
42
|
+
job, a busy lane), start the next independent task — in its own worktree when it is released separately.
|
|
43
|
+
|
|
44
|
+
## Briefing
|
|
45
|
+
|
|
46
|
+
- Brief for a ready plan: its path, "implement it yourself, spawn no sub-agents", and — when several scopes go to
|
|
47
|
+
one builder — "your scopes are one batch: test each pointwise (unit tests and only its own new or changed e2e
|
|
48
|
+
flows), the full suites run once at the finish".
|
|
49
|
+
- Brief without a plan: like a colleague who just walked in — the goal, file paths, what to change and why. Never
|
|
50
|
+
"based on your findings, implement it".
|
|
51
|
+
- Name the skills the worker must load, never their content, and never restate project rules.
|
|
52
|
+
- Role skills such as `developer`, `task-review`, `review`, `commit`: name them when the project offers them.
|
|
53
|
+
Otherwise state the role in words — builder: implement, test, self-review, commit each scope, no push;
|
|
54
|
+
reviewer: read the commit range against the plan or the user's asks and report findings, change nothing.
|
|
55
|
+
- Reuse the warm session: rework, the next small scope, or the next role on the same task resumes the SAME worker
|
|
56
|
+
session instead of starting a fresh one.
|
|
57
|
+
|
|
58
|
+
## Delivery loop — a ready plan
|
|
59
|
+
|
|
60
|
+
1. **Build.** One builder for the whole plan (or a group of small scopes); it commits each scope as it is green.
|
|
61
|
+
A large or risky scope, or an independent part running in parallel, may get a builder of its own.
|
|
62
|
+
2. **Bookkeeping.** A finished scope flips its `[x]`; the commit that flips the plan's last box also moves the
|
|
63
|
+
plan file to `completed/`.
|
|
64
|
+
3. **Finish — only when the whole task is done, never per scope:**
|
|
65
|
+
1. A fresh reviewer reviews ALL the task's commits once. Its brief: the plan path or the user's asks nearly
|
|
66
|
+
verbatim, the commit range, and the absolute path of its report file outside the worktree (e.g. its run
|
|
67
|
+
directory) — it writes nothing inside the worktree. Findings go back to a builder as rework, then a new review.
|
|
68
|
+
2. Clean → merge the task's branch into the base by fast-forward and remove its worktree. A branch that cannot
|
|
69
|
+
fast-forward goes back to its builder: rebase onto the base, rerun the tests the base's new commits affect.
|
|
70
|
+
3. A builder fetches; if the branch or its base moved on the remote, it pulls and rebases; then it runs ALL test
|
|
71
|
+
suites in full and fixes every failure.
|
|
72
|
+
4. Any fixes in 3 → a separate reviewer reviews just those fixes (same report path rule), then back to 3. Push
|
|
73
|
+
only after a full green run with no fixes after it.
|
|
74
|
+
Each loop runs up to 20 cycles while the findings are concrete local fixes, telling the user about each cycle
|
|
75
|
+
past the third — even when new findings keep landing in the same area. A major finding, or the 20 cycles used
|
|
76
|
+
up: stop, leave the work for inspection, report. Never propose cutting the agreed scope to escape the loop.
|
|
77
|
+
4. **Push** only when the user allowed it (in chat or in their own instructions); otherwise report it ready to
|
|
78
|
+
push — as a question the user will notice.
|
|
79
|
+
|
|
80
|
+
## No plan yet — interactive
|
|
81
|
+
|
|
82
|
+
- **Bugs and small reworks:** capture each into a living plan the moment it is said (stable ids, never renumber,
|
|
83
|
+
never drop a deferral). An unambiguous one goes to a builder at once; only a fork you cannot resolve goes to
|
|
84
|
+
the user first.
|
|
85
|
+
- **A feature or idea:** capture a draft; a researcher worker investigates the code and the web, decides every
|
|
86
|
+
point itself and returns a summary, its decisions and only the forks it could not resolve. Show them, record
|
|
87
|
+
the locked decisions, and ask before switching to building.
|
|
88
|
+
|
|
89
|
+
## Finally
|
|
90
|
+
|
|
91
|
+
Confirm from the reports that every changed file is listed, verification passed, the reviews are clean and the
|
|
92
|
+
plan is archived. Blocked or incomplete → leave the plan as it is for inspection. Report one line of outcome.
|