instar 1.3.1649 → 1.3.1650
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/dashboard/console/accounts.js +2 -1
- package/dashboard/console/agents-model.js +3 -3
- package/dashboard/console/agents.js +7 -4
- package/dashboard/console/console.css +1 -0
- package/dashboard/console/console.js +35 -4
- package/dashboard/console/costs-model.js +12 -0
- package/dashboard/console/costs.js +6 -3
- package/dashboard/console/development-model.js +9 -3
- package/dashboard/console/development.js +7 -4
- package/dashboard/console/home-model.js +30 -14
- package/dashboard/console/mandates.js +3 -3
- package/dashboard/console/needs-model.js +105 -0
- package/dashboard/console/plans.js +2 -1
- package/dashboard/console/secrets.js +2 -2
- package/dashboard/console/ticket-model.js +36 -0
- package/dashboard/console/ui.js +3 -0
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/install.d.ts +9 -7
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +2 -19
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/reflect.d.ts.map +1 -1
- package/dist/commands/reflect.js +2 -0
- package/dist/commands/reflect.js.map +1 -1
- package/dist/commands/route.d.ts.map +1 -1
- package/dist/commands/route.js +2 -0
- package/dist/commands/route.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +315 -14
- package/dist/commands/server.js.map +1 -1
- package/dist/commands/setClaudeKey.d.ts +8 -0
- package/dist/commands/setClaudeKey.d.ts.map +1 -0
- package/dist/commands/setClaudeKey.js +35 -0
- package/dist/commands/setClaudeKey.js.map +1 -0
- package/dist/core/AccountFollowMeOrchestrator.d.ts.map +1 -1
- package/dist/core/AccountFollowMeOrchestrator.js +4 -0
- package/dist/core/AccountFollowMeOrchestrator.js.map +1 -1
- package/dist/core/AppMediaStore.d.ts.map +1 -1
- package/dist/core/AppMediaStore.js +3 -0
- package/dist/core/AppMediaStore.js.map +1 -1
- package/dist/core/BackupManager.d.ts.map +1 -1
- package/dist/core/BackupManager.js +2 -0
- package/dist/core/BackupManager.js.map +1 -1
- package/dist/core/ClaudeCliIntelligenceProvider.d.ts.map +1 -1
- package/dist/core/ClaudeCliIntelligenceProvider.js +11 -3
- package/dist/core/ClaudeCliIntelligenceProvider.js.map +1 -1
- package/dist/core/ClaudeKeyHealth.d.ts +141 -0
- package/dist/core/ClaudeKeyHealth.d.ts.map +1 -0
- package/dist/core/ClaudeKeyHealth.js +467 -0
- package/dist/core/ClaudeKeyHealth.js.map +1 -0
- package/dist/core/CodexTaskContinuationStore.d.ts.map +1 -1
- package/dist/core/CodexTaskContinuationStore.js +7 -0
- package/dist/core/CodexTaskContinuationStore.js.map +1 -1
- package/dist/core/CoherenceJournal.d.ts +1 -1
- package/dist/core/CoherenceJournal.d.ts.map +1 -1
- package/dist/core/CoherenceJournal.js +11 -2
- package/dist/core/CoherenceJournal.js.map +1 -1
- package/dist/core/Config.d.ts +8 -0
- package/dist/core/Config.d.ts.map +1 -1
- package/dist/core/Config.js +26 -0
- package/dist/core/Config.js.map +1 -1
- package/dist/core/CredentialSwapExecutor.d.ts.map +1 -1
- package/dist/core/CredentialSwapExecutor.js +10 -0
- package/dist/core/CredentialSwapExecutor.js.map +1 -1
- package/dist/core/DecisionQualityRecorderImpl.d.ts.map +1 -1
- package/dist/core/DecisionQualityRecorderImpl.js +6 -0
- package/dist/core/DecisionQualityRecorderImpl.js.map +1 -1
- package/dist/core/DiscoveryEvaluator.d.ts.map +1 -1
- package/dist/core/DiscoveryEvaluator.js +4 -0
- package/dist/core/DiscoveryEvaluator.js.map +1 -1
- package/dist/core/IdentityReannounceClaimant.d.ts.map +1 -1
- package/dist/core/IdentityReannounceClaimant.js +4 -0
- package/dist/core/IdentityReannounceClaimant.js.map +1 -1
- package/dist/core/IntelligenceRouter.d.ts.map +1 -1
- package/dist/core/IntelligenceRouter.js +9 -0
- package/dist/core/IntelligenceRouter.js.map +1 -1
- package/dist/core/JournalSyncApplier.d.ts +1 -0
- package/dist/core/JournalSyncApplier.d.ts.map +1 -1
- package/dist/core/JournalSyncApplier.js +48 -0
- package/dist/core/JournalSyncApplier.js.map +1 -1
- package/dist/core/LeaseCoordinator.d.ts +4 -0
- package/dist/core/LeaseCoordinator.d.ts.map +1 -1
- package/dist/core/LeaseCoordinator.js +64 -1
- package/dist/core/LeaseCoordinator.js.map +1 -1
- package/dist/core/MessagingToneGate.d.ts +11 -7
- package/dist/core/MessagingToneGate.d.ts.map +1 -1
- package/dist/core/MessagingToneGate.js +15 -1
- package/dist/core/MessagingToneGate.js.map +1 -1
- package/dist/core/MobileDeviceKeys.d.ts +10 -0
- package/dist/core/MobileDeviceKeys.d.ts.map +1 -1
- package/dist/core/MobileDeviceKeys.js +17 -0
- package/dist/core/MobileDeviceKeys.js.map +1 -1
- package/dist/core/MultiMachineCoordinator.d.ts +12 -0
- package/dist/core/MultiMachineCoordinator.d.ts.map +1 -1
- package/dist/core/MultiMachineCoordinator.js +115 -3
- package/dist/core/MultiMachineCoordinator.js.map +1 -1
- package/dist/core/MutualSshRuntime.d.ts +1 -0
- package/dist/core/MutualSshRuntime.d.ts.map +1 -1
- package/dist/core/MutualSshRuntime.js +17 -1
- package/dist/core/MutualSshRuntime.js.map +1 -1
- package/dist/core/ObservedEndpointTracker.d.ts +1 -0
- package/dist/core/ObservedEndpointTracker.d.ts.map +1 -1
- package/dist/core/ObservedEndpointTracker.js +17 -0
- package/dist/core/ObservedEndpointTracker.js.map +1 -1
- package/dist/core/OverloadShedPlanner.d.ts.map +1 -1
- package/dist/core/OverloadShedPlanner.js +9 -0
- package/dist/core/OverloadShedPlanner.js.map +1 -1
- package/dist/core/OwnershipApplier.d.ts.map +1 -1
- package/dist/core/OwnershipApplier.js +7 -0
- package/dist/core/OwnershipApplier.js.map +1 -1
- package/dist/core/OwnershipReconciler.d.ts.map +1 -1
- package/dist/core/OwnershipReconciler.js +5 -0
- package/dist/core/OwnershipReconciler.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +8 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +76 -2
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/PrHandLease.d.ts.map +1 -1
- package/dist/core/PrHandLease.js +2 -0
- package/dist/core/PrHandLease.js.map +1 -1
- package/dist/core/ProactiveSwapMonitor.d.ts.map +1 -1
- package/dist/core/ProactiveSwapMonitor.js +7 -0
- package/dist/core/ProactiveSwapMonitor.js.map +1 -1
- package/dist/core/ProjectRoundExecution.d.ts.map +1 -1
- package/dist/core/ProjectRoundExecution.js +3 -2
- package/dist/core/ProjectRoundExecution.js.map +1 -1
- package/dist/core/QueueDrainLoop.d.ts +7 -0
- package/dist/core/QueueDrainLoop.d.ts.map +1 -1
- package/dist/core/QueueDrainLoop.js +37 -1
- package/dist/core/QueueDrainLoop.js.map +1 -1
- package/dist/core/RemoteAckStore.d.ts.map +1 -1
- package/dist/core/RemoteAckStore.js +4 -0
- package/dist/core/RemoteAckStore.js.map +1 -1
- package/dist/core/ReplicatedStoreReconcilerWiring.d.ts.map +1 -1
- package/dist/core/ReplicatedStoreReconcilerWiring.js +1 -0
- package/dist/core/ReplicatedStoreReconcilerWiring.js.map +1 -1
- package/dist/core/SecretSync.d.ts +1 -0
- package/dist/core/SecretSync.d.ts.map +1 -1
- package/dist/core/SecretSync.js +16 -0
- package/dist/core/SecretSync.js.map +1 -1
- package/dist/core/SessionManager.d.ts +11 -0
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +125 -14
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/SessionPoolFailoverRunner.d.ts.map +1 -1
- package/dist/core/SessionPoolFailoverRunner.js +4 -0
- package/dist/core/SessionPoolFailoverRunner.js.map +1 -1
- package/dist/core/SleepWakeDetector.d.ts.map +1 -1
- package/dist/core/SleepWakeDetector.js +10 -0
- package/dist/core/SleepWakeDetector.js.map +1 -1
- package/dist/core/SubscriptionReloginStore.d.ts.map +1 -1
- package/dist/core/SubscriptionReloginStore.js +10 -1
- package/dist/core/SubscriptionReloginStore.js.map +1 -1
- package/dist/core/TopicPinMutation.d.ts.map +1 -1
- package/dist/core/TopicPinMutation.js +5 -0
- package/dist/core/TopicPinMutation.js.map +1 -1
- package/dist/core/UnjustifiedStopGate.d.ts.map +1 -1
- package/dist/core/UnjustifiedStopGate.js +22 -0
- package/dist/core/UnjustifiedStopGate.js.map +1 -1
- package/dist/core/WindowRunCadenceExecutor.d.ts.map +1 -1
- package/dist/core/WindowRunCadenceExecutor.js +20 -0
- package/dist/core/WindowRunCadenceExecutor.js.map +1 -1
- package/dist/core/claudeChildAuth.d.ts +68 -0
- package/dist/core/claudeChildAuth.d.ts.map +1 -0
- package/dist/core/claudeChildAuth.js +173 -0
- package/dist/core/claudeChildAuth.js.map +1 -0
- package/dist/core/claudeKeyProbe.d.ts +23 -0
- package/dist/core/claudeKeyProbe.d.ts.map +1 -0
- package/dist/core/claudeKeyProbe.js +68 -0
- package/dist/core/claudeKeyProbe.js.map +1 -0
- package/dist/core/codexDeviceLimitWiring.d.ts.map +1 -1
- package/dist/core/codexDeviceLimitWiring.js +12 -0
- package/dist/core/codexDeviceLimitWiring.js.map +1 -1
- package/dist/core/deliverToConversation.d.ts.map +1 -1
- package/dist/core/deliverToConversation.js +11 -0
- package/dist/core/deliverToConversation.js.map +1 -1
- package/dist/core/meteredCallEntry.d.ts.map +1 -1
- package/dist/core/meteredCallEntry.js +21 -0
- package/dist/core/meteredCallEntry.js.map +1 -1
- package/dist/core/nobodyPollingActuator.d.ts.map +1 -1
- package/dist/core/nobodyPollingActuator.js +5 -0
- package/dist/core/nobodyPollingActuator.js.map +1 -1
- package/dist/core/operatorSurfaceReferral.d.ts +18 -0
- package/dist/core/operatorSurfaceReferral.d.ts.map +1 -0
- package/dist/core/operatorSurfaceReferral.js +32 -0
- package/dist/core/operatorSurfaceReferral.js.map +1 -0
- package/dist/core/ownershipFollowsLiveWork.d.ts.map +1 -1
- package/dist/core/ownershipFollowsLiveWork.js +10 -1
- package/dist/core/ownershipFollowsLiveWork.js.map +1 -1
- package/dist/core/types.d.ts +15 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/worktreeDirtyCheck.d.ts.map +1 -1
- package/dist/core/worktreeDirtyCheck.js +2 -0
- package/dist/core/worktreeDirtyCheck.js.map +1 -1
- package/dist/data/stageBCertifiedSet.d.ts +9 -0
- package/dist/data/stageBCertifiedSet.d.ts.map +1 -1
- package/dist/data/stageBCertifiedSet.js +12 -0
- package/dist/data/stageBCertifiedSet.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
- package/dist/lifeline/TelegramLifeline.js +17 -3
- package/dist/lifeline/TelegramLifeline.js.map +1 -1
- package/dist/messaging/attentionHubPolicy.d.ts.map +1 -1
- package/dist/messaging/attentionHubPolicy.js +1 -0
- package/dist/messaging/attentionHubPolicy.js.map +1 -1
- package/dist/monitoring/AgentWorktreeReaper.d.ts.map +1 -1
- package/dist/monitoring/AgentWorktreeReaper.js +15 -0
- package/dist/monitoring/AgentWorktreeReaper.js.map +1 -1
- package/dist/monitoring/ApprenticeshipCycleSlaMonitor.d.ts.map +1 -1
- package/dist/monitoring/ApprenticeshipCycleSlaMonitor.js +18 -9
- package/dist/monitoring/ApprenticeshipCycleSlaMonitor.js.map +1 -1
- package/dist/monitoring/CodexArmSessionSweeper.d.ts.map +1 -1
- package/dist/monitoring/CodexArmSessionSweeper.js +11 -0
- package/dist/monitoring/CodexArmSessionSweeper.js.map +1 -1
- package/dist/monitoring/CrashLoopPauser.d.ts.map +1 -1
- package/dist/monitoring/CrashLoopPauser.js +8 -0
- package/dist/monitoring/CrashLoopPauser.js.map +1 -1
- package/dist/monitoring/DegradationReporter.d.ts.map +1 -1
- package/dist/monitoring/DegradationReporter.js +7 -1
- package/dist/monitoring/DegradationReporter.js.map +1 -1
- package/dist/monitoring/DegradedTmuxGuard.d.ts +2 -0
- package/dist/monitoring/DegradedTmuxGuard.d.ts.map +1 -1
- package/dist/monitoring/DegradedTmuxGuard.js +14 -0
- package/dist/monitoring/DegradedTmuxGuard.js.map +1 -1
- package/dist/monitoring/DurableOutputScrubber.d.ts.map +1 -1
- package/dist/monitoring/DurableOutputScrubber.js +7 -0
- package/dist/monitoring/DurableOutputScrubber.js.map +1 -1
- package/dist/monitoring/DurableVaultSession.d.ts.map +1 -1
- package/dist/monitoring/DurableVaultSession.js +15 -0
- package/dist/monitoring/DurableVaultSession.js.map +1 -1
- package/dist/monitoring/ExternalHogSentinel.d.ts +2 -0
- package/dist/monitoring/ExternalHogSentinel.d.ts.map +1 -1
- package/dist/monitoring/ExternalHogSentinel.js +27 -1
- package/dist/monitoring/ExternalHogSentinel.js.map +1 -1
- package/dist/monitoring/FailureLedger.d.ts.map +1 -1
- package/dist/monitoring/FailureLedger.js +38 -1
- package/dist/monitoring/FailureLedger.js.map +1 -1
- package/dist/monitoring/FeatureEvidenceLog.d.ts +5 -0
- package/dist/monitoring/FeatureEvidenceLog.d.ts.map +1 -1
- package/dist/monitoring/FeatureEvidenceLog.js +25 -0
- package/dist/monitoring/FeatureEvidenceLog.js.map +1 -1
- package/dist/monitoring/GeminiCapacityEscalationMonitor.d.ts.map +1 -1
- package/dist/monitoring/GeminiCapacityEscalationMonitor.js +20 -2
- package/dist/monitoring/GeminiCapacityEscalationMonitor.js.map +1 -1
- package/dist/monitoring/GeminiLoopRunner.d.ts.map +1 -1
- package/dist/monitoring/GeminiLoopRunner.js +11 -1
- package/dist/monitoring/GeminiLoopRunner.js.map +1 -1
- package/dist/monitoring/GreenPrAutoMerger.d.ts.map +1 -1
- package/dist/monitoring/GreenPrAutoMerger.js +11 -0
- package/dist/monitoring/GreenPrAutoMerger.js.map +1 -1
- package/dist/monitoring/GrowthDigestPublisher.d.ts.map +1 -1
- package/dist/monitoring/GrowthDigestPublisher.js +16 -0
- package/dist/monitoring/GrowthDigestPublisher.js.map +1 -1
- package/dist/monitoring/GrowthMilestoneAnalyst.d.ts +3 -0
- package/dist/monitoring/GrowthMilestoneAnalyst.d.ts.map +1 -1
- package/dist/monitoring/GrowthMilestoneAnalyst.js +45 -1
- package/dist/monitoring/GrowthMilestoneAnalyst.js.map +1 -1
- package/dist/monitoring/McpProcessReaper.d.ts +2 -0
- package/dist/monitoring/McpProcessReaper.d.ts.map +1 -1
- package/dist/monitoring/McpProcessReaper.js +32 -0
- package/dist/monitoring/McpProcessReaper.js.map +1 -1
- package/dist/monitoring/MissingLoginSessionDetector.d.ts +2 -1
- package/dist/monitoring/MissingLoginSessionDetector.d.ts.map +1 -1
- package/dist/monitoring/MissingLoginSessionDetector.js +23 -0
- package/dist/monitoring/MissingLoginSessionDetector.js.map +1 -1
- package/dist/monitoring/OrchestratorPoller.d.ts +1 -0
- package/dist/monitoring/OrchestratorPoller.d.ts.map +1 -1
- package/dist/monitoring/OrchestratorPoller.js +13 -0
- package/dist/monitoring/OrchestratorPoller.js.map +1 -1
- package/dist/monitoring/OrphanedWorkSentinel.d.ts.map +1 -1
- package/dist/monitoring/OrphanedWorkSentinel.js +7 -0
- package/dist/monitoring/OrphanedWorkSentinel.js.map +1 -1
- package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
- package/dist/monitoring/PresenceProxy.js +9 -1
- package/dist/monitoring/PresenceProxy.js.map +1 -1
- package/dist/monitoring/ProcessFootprintMonitor.d.ts.map +1 -1
- package/dist/monitoring/ProcessFootprintMonitor.js +20 -2
- package/dist/monitoring/ProcessFootprintMonitor.js.map +1 -1
- package/dist/monitoring/PromiseBeacon.d.ts.map +1 -1
- package/dist/monitoring/PromiseBeacon.js +20 -0
- package/dist/monitoring/PromiseBeacon.js.map +1 -1
- package/dist/monitoring/ReleaseReadinessSentinel.d.ts +2 -0
- package/dist/monitoring/ReleaseReadinessSentinel.d.ts.map +1 -1
- package/dist/monitoring/ReleaseReadinessSentinel.js +26 -0
- package/dist/monitoring/ReleaseReadinessSentinel.js.map +1 -1
- package/dist/monitoring/RopeHealthMonitor.d.ts.map +1 -1
- package/dist/monitoring/RopeHealthMonitor.js +35 -1
- package/dist/monitoring/RopeHealthMonitor.js.map +1 -1
- package/dist/monitoring/SentinelNotifier.d.ts.map +1 -1
- package/dist/monitoring/SentinelNotifier.js +16 -0
- package/dist/monitoring/SentinelNotifier.js.map +1 -1
- package/dist/monitoring/SessionReaper.d.ts.map +1 -1
- package/dist/monitoring/SessionReaper.js +11 -2
- package/dist/monitoring/SessionReaper.js.map +1 -1
- package/dist/monitoring/SingleMachineFailoverGapDetector.d.ts +2 -0
- package/dist/monitoring/SingleMachineFailoverGapDetector.d.ts.map +1 -1
- package/dist/monitoring/SingleMachineFailoverGapDetector.js +20 -0
- package/dist/monitoring/SingleMachineFailoverGapDetector.js.map +1 -1
- package/dist/monitoring/SpeakerElection.d.ts.map +1 -1
- package/dist/monitoring/SpeakerElection.js +8 -0
- package/dist/monitoring/SpeakerElection.js.map +1 -1
- package/dist/monitoring/StrandedTopicSentinel.d.ts +3 -0
- package/dist/monitoring/StrandedTopicSentinel.d.ts.map +1 -1
- package/dist/monitoring/StrandedTopicSentinel.js +33 -0
- package/dist/monitoring/StrandedTopicSentinel.js.map +1 -1
- package/dist/native/InstarWedgeCanary.app/Contents/MacOS/InstarWedgeCanary +0 -0
- package/dist/native/instar-desktop-host +0 -0
- package/dist/providers/adapters/anthropic-headless/transport/oneShotCompletion.d.ts.map +1 -1
- package/dist/providers/adapters/anthropic-headless/transport/oneShotCompletion.js +5 -2
- package/dist/providers/adapters/anthropic-headless/transport/oneShotCompletion.js.map +1 -1
- package/dist/recommended/RecommendedServicesLedger.d.ts +91 -0
- package/dist/recommended/RecommendedServicesLedger.d.ts.map +1 -0
- package/dist/recommended/RecommendedServicesLedger.js +193 -0
- package/dist/recommended/RecommendedServicesLedger.js.map +1 -0
- package/dist/recommended/RecommendedServicesReplicatedStore.d.ts +14 -0
- package/dist/recommended/RecommendedServicesReplicatedStore.d.ts.map +1 -0
- package/dist/recommended/RecommendedServicesReplicatedStore.js +34 -0
- package/dist/recommended/RecommendedServicesReplicatedStore.js.map +1 -0
- package/dist/recommended/legacyDeclines.d.ts +11 -0
- package/dist/recommended/legacyDeclines.d.ts.map +1 -0
- package/dist/recommended/legacyDeclines.js +17 -0
- package/dist/recommended/legacyDeclines.js.map +1 -0
- package/dist/recommended/serviceIds.d.ts +3 -0
- package/dist/recommended/serviceIds.d.ts.map +1 -0
- package/dist/recommended/serviceIds.js +6 -0
- package/dist/recommended/serviceIds.js.map +1 -0
- package/dist/scaffold/templates.d.ts +2 -0
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +8 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/scheduler/JobResultTriage.d.ts.map +1 -1
- package/dist/scheduler/JobResultTriage.js +10 -0
- package/dist/scheduler/JobResultTriage.js.map +1 -1
- package/dist/scheduler/JobScheduler.d.ts.map +1 -1
- package/dist/scheduler/JobScheduler.js +12 -0
- package/dist/scheduler/JobScheduler.js.map +1 -1
- package/dist/scheduler/MentorOnboardingRunner.d.ts +3 -0
- package/dist/scheduler/MentorOnboardingRunner.d.ts.map +1 -1
- package/dist/scheduler/MentorOnboardingRunner.js +24 -2
- package/dist/scheduler/MentorOnboardingRunner.js.map +1 -1
- package/dist/server/AgentServer.d.ts +2 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +76 -15
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/BootHealthBeacon.d.ts +3 -0
- package/dist/server/BootHealthBeacon.d.ts.map +1 -1
- package/dist/server/BootHealthBeacon.js +9 -0
- package/dist/server/BootHealthBeacon.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +10 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/LifelineIngressGuard.d.ts.map +1 -1
- package/dist/server/LifelineIngressGuard.js +11 -0
- package/dist/server/LifelineIngressGuard.js.map +1 -1
- package/dist/server/PoolPollCache.d.ts +4 -0
- package/dist/server/PoolPollCache.d.ts.map +1 -1
- package/dist/server/PoolPollCache.js +33 -0
- package/dist/server/PoolPollCache.js.map +1 -1
- package/dist/server/machineRoutes.d.ts.map +1 -1
- package/dist/server/machineRoutes.js +6 -0
- package/dist/server/machineRoutes.js.map +1 -1
- package/dist/server/middleware.d.ts.map +1 -1
- package/dist/server/middleware.js +6 -0
- package/dist/server/middleware.js.map +1 -1
- package/dist/server/mobileConsoleTicket.d.ts +113 -0
- package/dist/server/mobileConsoleTicket.d.ts.map +1 -0
- package/dist/server/mobileConsoleTicket.js +405 -0
- package/dist/server/mobileConsoleTicket.js.map +1 -0
- package/dist/server/mobileConversationRoutes.d.ts.map +1 -1
- package/dist/server/mobileConversationRoutes.js +20 -1
- package/dist/server/mobileConversationRoutes.js.map +1 -1
- package/dist/server/mobileMediaRoutes.d.ts.map +1 -1
- package/dist/server/mobileMediaRoutes.js +3 -0
- package/dist/server/mobileMediaRoutes.js.map +1 -1
- package/dist/server/mobilePairingRoutes.d.ts +8 -2
- package/dist/server/mobilePairingRoutes.d.ts.map +1 -1
- package/dist/server/mobilePairingRoutes.js +67 -6
- package/dist/server/mobilePairingRoutes.js.map +1 -1
- package/dist/server/mobileSessionTerminalRoutes.d.ts +128 -0
- package/dist/server/mobileSessionTerminalRoutes.d.ts.map +1 -0
- package/dist/server/mobileSessionTerminalRoutes.js +389 -0
- package/dist/server/mobileSessionTerminalRoutes.js.map +1 -0
- package/dist/server/recommendedServiceRoutes.d.ts +13 -0
- package/dist/server/recommendedServiceRoutes.d.ts.map +1 -0
- package/dist/server/recommendedServiceRoutes.js +49 -0
- package/dist/server/recommendedServiceRoutes.js.map +1 -0
- package/dist/server/routes.d.ts +2 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +170 -4
- package/dist/server/routes.js.map +1 -1
- package/dist/testing/selfActionRegistry.d.ts.map +1 -1
- package/dist/testing/selfActionRegistry.js +36 -0
- package/dist/testing/selfActionRegistry.js.map +1 -1
- package/dist/threadline/A2ACheckInProxy.d.ts.map +1 -1
- package/dist/threadline/A2ACheckInProxy.js +26 -15
- package/dist/threadline/A2ACheckInProxy.js.map +1 -1
- package/dist/threadline/AgentTrustManager.d.ts.map +1 -1
- package/dist/threadline/AgentTrustManager.js +3 -0
- package/dist/threadline/AgentTrustManager.js.map +1 -1
- package/dist/threadline/InboundIdLedger.d.ts.map +1 -1
- package/dist/threadline/InboundIdLedger.js +18 -1
- package/dist/threadline/InboundIdLedger.js.map +1 -1
- package/dist/threadline/NegotiatorGate.d.ts.map +1 -1
- package/dist/threadline/NegotiatorGate.js +11 -0
- package/dist/threadline/NegotiatorGate.js.map +1 -1
- package/dist/threadline/PipeSessionSpawner.d.ts.map +1 -1
- package/dist/threadline/PipeSessionSpawner.js +8 -0
- package/dist/threadline/PipeSessionSpawner.js.map +1 -1
- package/dist/threadline/ThreadlineRouter.d.ts.map +1 -1
- package/dist/threadline/ThreadlineRouter.js +13 -0
- package/dist/threadline/ThreadlineRouter.js.map +1 -1
- package/dist/threadline/pairingReplicationWiring.d.ts.map +1 -1
- package/dist/threadline/pairingReplicationWiring.js +9 -0
- package/dist/threadline/pairingReplicationWiring.js.map +1 -1
- package/dist/threadline/relayForward.d.ts.map +1 -1
- package/dist/threadline/relayForward.js +13 -2
- package/dist/threadline/relayForward.js.map +1 -1
- package/dist/threadline/relayUnknownSenderTrust.d.ts +0 -9
- package/dist/threadline/relayUnknownSenderTrust.d.ts.map +1 -1
- package/dist/threadline/relayUnknownSenderTrust.js +16 -0
- package/dist/threadline/relayUnknownSenderTrust.js.map +1 -1
- package/package.json +1 -1
- package/scripts/check-constitution-pairing.mjs +273 -0
- package/scripts/safe-merge.mjs +9 -0
- package/src/data/builtin-manifest.json +103 -103
- package/src/data/feature-ladders.json +113 -113
- package/src/data/stageBCertifiedSet.ts +12 -0
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/src/data/state-coherence-registry.json +18 -0
- package/src/scaffold/templates.ts +9 -0
- package/upgrades/1.3.1650.md +105 -0
- package/upgrades/mobile-console-device-signin.eli16.md +5 -0
- package/upgrades/side-effects/cloud-key-internal-calls.md +116 -0
- package/upgrades/side-effects/constitution-alignment.eli16.md +11 -0
- package/upgrades/side-effects/constitution-alignment.md +69 -0
- package/upgrades/side-effects/feature-evidence-recording.eli16.md +3 -0
- package/upgrades/side-effects/feature-evidence-recording.md +66 -0
- package/upgrades/side-effects/feedback-reroute-admission-parity.md +77 -0
- package/upgrades/side-effects/mobile-console-device-signin.md +102 -0
- package/upgrades/side-effects/mobile-native-session-screen.md +88 -0
- package/upgrades/side-effects/operator-needs-first-screen.md +87 -0
- package/upgrades/side-effects/recommended-services-choices.md +50 -0
- package/upgrades/side-effects/rerouted-lifetime-active-process.md +63 -0
- package/upgrades/side-effects/undated-resurfacer-e2e-wait.eli16.md +5 -0
- package/upgrades/side-effects/undated-resurfacer-e2e-wait.md +9 -0
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* and can be monitored/reaped by the server.
|
|
7
7
|
*/
|
|
8
8
|
import { isCredentialEnvName, CLAUDE_CONFINED_PERMISSION_ARGS } from './credentialEnvNames.js';
|
|
9
|
+
import { featureEvidence } from '../monitoring/FeatureEvidenceLog.js';
|
|
9
10
|
import { execFileSync, execFile } from 'node:child_process';
|
|
10
11
|
import { isInstarSourceTree } from './SourceTreeGuard.js';
|
|
11
12
|
import { AdmissionRefusedError } from './workAdmission.js';
|
|
@@ -44,6 +45,7 @@ import { detectRateLimited, nextIdleThrottleAction, RATE_LIMIT_SETTLED_CAPTURE_L
|
|
|
44
45
|
import { classifyIdleError } from './IdleErrorClassifier.js';
|
|
45
46
|
import { classifyLoginExpired } from './LoginExpiredSignature.js';
|
|
46
47
|
import { liveTail } from './paneTail.js';
|
|
48
|
+
import { claudeAuthExecPrefix, removeClaudeAuthEnvFile, writeClaudeAuthEnvFile } from './claudeChildAuth.js';
|
|
47
49
|
import { resolveIdleSinceSeed } from './idleSincePersistence.js';
|
|
48
50
|
import { toPaneTailLines, RESOLVER_PREGATE_RE } from '../monitoring/PermissionPromptAutoResolver.js';
|
|
49
51
|
const execFileAsync = promisify(execFile);
|
|
@@ -88,6 +90,7 @@ const ageKillGov = governor.for('age-kill-backoff');
|
|
|
88
90
|
* the lease-holder boundary unchanged.
|
|
89
91
|
*/
|
|
90
92
|
const LOCAL_AGE_LIMIT_REAP_CAPABILITY = Symbol('local-age-limit-reap-capability');
|
|
93
|
+
const REROUTED_LIFETIME_REAP_CAPABILITY = Symbol('rerouted-lifetime-reap-capability');
|
|
91
94
|
/**
|
|
92
95
|
* How long a confirmed-move assertion stays valid. A CODE CONSTANT, never config:
|
|
93
96
|
* a safety bound in config is a safety bound an emergency edit can silently remove
|
|
@@ -1242,6 +1245,13 @@ export class SessionManager extends EventEmitter {
|
|
|
1242
1245
|
// guard counts the degraded-call signal distinctly from a generic error.
|
|
1243
1246
|
const killed = e.killed === true || e.signal === 'SIGKILL' || /SIGKILL/.test(msg);
|
|
1244
1247
|
this.degradedTmuxGuard?.observeTmuxCall(Date.now() - t0, killed ? 'killed-client' : 'indeterminate');
|
|
1248
|
+
if (this.tmuxAsyncEnabled) {
|
|
1249
|
+
featureEvidence.recordAtMostEvery('monitoring.tmuxResilience.asyncHotPath', killed ? 'timeout' : 'indeterminate', 300_000, {
|
|
1250
|
+
kind: killed ? 'fired' : 'error',
|
|
1251
|
+
reason: killed ? 'bounded-call-timed-out-and-killed' : 'tmux-call-failed-indeterminate',
|
|
1252
|
+
context: { op: args[0] ?? 'unknown', elapsedMs: Date.now() - t0, timeoutMs: timeout, inFlight: this.tmuxInflightCount },
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1245
1255
|
return { state: 'indeterminate', reason: msg.slice(0, 120) };
|
|
1246
1256
|
}
|
|
1247
1257
|
}
|
|
@@ -1734,6 +1744,51 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
1734
1744
|
setInteractiveLoginExpiredSink(fn) {
|
|
1735
1745
|
this.interactiveLoginExpiredSink = fn;
|
|
1736
1746
|
}
|
|
1747
|
+
/** Put a handler ahead of the sink. When it returns true the signal is handled and goes no further. */
|
|
1748
|
+
prependInteractiveLoginExpiredSink(first) {
|
|
1749
|
+
const rest = this.interactiveLoginExpiredSink;
|
|
1750
|
+
this.interactiveLoginExpiredSink = async (input) => {
|
|
1751
|
+
if (await first(input))
|
|
1752
|
+
return;
|
|
1753
|
+
await rest?.(input);
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1756
|
+
/** A restored sign-in key for every later launch. `config` here is a copy, so server code can't reach it. */
|
|
1757
|
+
setAnthropicKey(key) {
|
|
1758
|
+
this.config.anthropicApiKey = key ?? undefined;
|
|
1759
|
+
}
|
|
1760
|
+
/** Forget which sessions were already reported, so a stuck one is offered again on the next check. */
|
|
1761
|
+
clearInteractiveLoginReports() {
|
|
1762
|
+
this.interactiveLoginReportedAt.clear();
|
|
1763
|
+
}
|
|
1764
|
+
/** Unprotected topic sessions showing Claude Code's own login frame right now. */
|
|
1765
|
+
async listSessionsAtLoginScreen() {
|
|
1766
|
+
const stuck = [];
|
|
1767
|
+
for (const session of this.listRunningSessions()) {
|
|
1768
|
+
if ((session.framework ?? 'claude-code') !== 'claude-code' || session.jobSlug)
|
|
1769
|
+
continue;
|
|
1770
|
+
if (this.config.protectedSessions.includes(session.tmuxSession))
|
|
1771
|
+
continue;
|
|
1772
|
+
const pane = (await this.captureOutputMaybeAsync(session.tmuxSession, 40)) || '';
|
|
1773
|
+
const verdict = classifyLoginExpired(pane);
|
|
1774
|
+
if (verdict.loginExpired && verdict.messageLed)
|
|
1775
|
+
stuck.push(session.tmuxSession);
|
|
1776
|
+
}
|
|
1777
|
+
return stuck;
|
|
1778
|
+
}
|
|
1779
|
+
/** The key a session was launched with, as tmux holds it. Read for comparison only: never log it. */
|
|
1780
|
+
sessionLaunchKey(tmuxSession) {
|
|
1781
|
+
try {
|
|
1782
|
+
const line = withSyncOp(() => execFileSync(this.config.tmuxPath, ['show-environment', '-t', `=${tmuxSession}:`, 'CLAUDE_CODE_OAUTH_TOKEN'], {
|
|
1783
|
+
encoding: 'utf-8', timeout: 5000, stdio: ['ignore', 'pipe', 'ignore'],
|
|
1784
|
+
})).trim();
|
|
1785
|
+
const value = line.startsWith('CLAUDE_CODE_OAUTH_TOKEN=') ? line.slice('CLAUDE_CODE_OAUTH_TOKEN='.length) : '';
|
|
1786
|
+
return value || null;
|
|
1787
|
+
}
|
|
1788
|
+
catch {
|
|
1789
|
+
return null;
|
|
1790
|
+
} // @silent-fallback-ok: unset or unreadable means no launch key, and no key means no refresh
|
|
1791
|
+
}
|
|
1737
1792
|
setCodexSigninTriggerSink(fn) {
|
|
1738
1793
|
this.codexSigninTriggerSink = fn;
|
|
1739
1794
|
}
|
|
@@ -2063,6 +2118,15 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
2063
2118
|
}
|
|
2064
2119
|
const isAuthorizedTopicMovedCloseout = reason.startsWith('topic moved')
|
|
2065
2120
|
&& opts?.localPostTransferCloseout === true;
|
|
2121
|
+
const isAuthorizedReroutedLifetime = reason === 'rerouted-lifetime'
|
|
2122
|
+
&& opts?.reroutedLifetimeReapCapability === REROUTED_LIFETIME_REAP_CAPABILITY
|
|
2123
|
+
&& session.launchLane === 'rerouted-interactive'
|
|
2124
|
+
&& session.completionMode === 'pattern'
|
|
2125
|
+
&& typeof session.maxLifetimeMinutes === 'number'
|
|
2126
|
+
&& Number.isFinite(session.maxLifetimeMinutes)
|
|
2127
|
+
&& session.maxLifetimeMinutes > 0
|
|
2128
|
+
&& !!session.startedAt
|
|
2129
|
+
&& Date.now() - Date.parse(session.startedAt) > session.maxLifetimeMinutes * 60_000;
|
|
2066
2130
|
const authorityScope = origin === 'operator'
|
|
2067
2131
|
? 'operator'
|
|
2068
2132
|
: holdsServingLease
|
|
@@ -2127,6 +2191,14 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
2127
2191
|
bypassedReasons.push('recovery-in-flight');
|
|
2128
2192
|
if (opts?.bypassActiveProcessKeep)
|
|
2129
2193
|
bypassedReasons.push('active-process');
|
|
2194
|
+
// A rerouted one-shot is an interactive REPL, so a live child process can
|
|
2195
|
+
// remain after its hard deadline. The monitor's private capability and
|
|
2196
|
+
// this second expiry check let the hard cap bypass only process-activity
|
|
2197
|
+
// evidence. Protected sessions, user activity, commitments and other
|
|
2198
|
+
// KEEP reasons still veto termination.
|
|
2199
|
+
if (isAuthorizedReroutedLifetime) {
|
|
2200
|
+
bypassedReasons.push('active-process', 'main-process-active', 'process-uninspectable');
|
|
2201
|
+
}
|
|
2130
2202
|
if (opts?.bypassRecentUserMessageForConfirmedMove || opts?.topicTransferClose === true) {
|
|
2131
2203
|
bypassedReasons.push('recent-user-message');
|
|
2132
2204
|
}
|
|
@@ -2608,6 +2680,13 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
2608
2680
|
// (A) tri-state: ONLY a definitive `false` (dead) marks the session
|
|
2609
2681
|
// completed. `'indeterminate'` (slow/timed-out tmux) does NOT — it falls
|
|
2610
2682
|
// through to be re-checked next tick rather than reaping a live session.
|
|
2683
|
+
if (alive === 'indeterminate') {
|
|
2684
|
+
featureEvidence.recordAtMostEvery('monitoring.tmuxResilience.asyncHotPath', `kept:${session.tmuxSession}`, 300_000, { kind: 'held', reason: 'indeterminate-probe-kept-session', context: { session: session.tmuxSession } });
|
|
2685
|
+
}
|
|
2686
|
+
if (alive === false && this.tmuxAsyncEnabled) {
|
|
2687
|
+
// A definitive-dead verdict is the one a spurious reap would come from; the review grades these rows.
|
|
2688
|
+
featureEvidence.record('monitoring.tmuxResilience.asyncHotPath', { kind: 'fired', reason: 'probe-classified-session-dead', context: { session: session.tmuxSession } });
|
|
2689
|
+
}
|
|
2611
2690
|
if (alive === false) {
|
|
2612
2691
|
// CAS re-read after the await: an operator kill (or another killer)
|
|
2613
2692
|
// can land mid-probe, so re-read the live record before mutating it —
|
|
@@ -2718,12 +2797,14 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
2718
2797
|
if (lifeElapsedMin > session.maxLifetimeMinutes &&
|
|
2719
2798
|
!this.config.protectedSessions.includes(session.tmuxSession) &&
|
|
2720
2799
|
!this.isStandingSession(session.tmuxSession)) {
|
|
2721
|
-
|
|
2722
|
-
const killed = await this.terminateSession(session.id, 'rerouted-lifetime', {
|
|
2800
|
+
const killed = await this.#terminateSessionInternal(session.id, 'rerouted-lifetime', {
|
|
2723
2801
|
finalStatus: 'killed',
|
|
2724
2802
|
disposition: 'terminal',
|
|
2803
|
+
origin: 'autonomous',
|
|
2804
|
+
reroutedLifetimeReapCapability: REROUTED_LIFETIME_REAP_CAPABILITY,
|
|
2725
2805
|
});
|
|
2726
2806
|
if (killed.terminated) {
|
|
2807
|
+
console.warn(`[SessionManager] Rerouted session "${session.name}" exceeded its hard lifetime (${Math.round(lifeElapsedMin)}m > ${session.maxLifetimeMinutes}m) without a completion sentinel. Killed (timeout).`);
|
|
2727
2808
|
DegradationReporter.getInstance().report({
|
|
2728
2809
|
feature: 'SessionManager.monitorTick.reroutedLifetime',
|
|
2729
2810
|
primary: 'rerouted-interactive session completes via its sentinel within the lifetime cap',
|
|
@@ -2997,11 +3078,15 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
2997
3078
|
const settledSnapshot = await this.captureOutputMaybeAsync(session.tmuxSession, RATE_LIMIT_SETTLED_CAPTURE_LINES);
|
|
2998
3079
|
const { action, nextState } = nextIdleThrottleAction(settledSnapshot, this.idleThrottleSettle.get(session.tmuxSession), now);
|
|
2999
3080
|
if (action === 'emit') {
|
|
3081
|
+
featureEvidence.record('monitoring.idleThrottleSettleGate', { kind: 'fired', reason: 'settled-handed-to-rate-limit-sentinel', context: { session: session.tmuxSession, snapshotRead: settledSnapshot != null } });
|
|
3000
3082
|
this.idleThrottleSettle.delete(session.tmuxSession);
|
|
3001
3083
|
this.emit('rateLimitedAtIdle', session.tmuxSession);
|
|
3002
3084
|
continue; // Settled → sentinel owns recovery.
|
|
3003
3085
|
}
|
|
3004
3086
|
if (action === 'wait') {
|
|
3087
|
+
if (!this.idleThrottleSettle.has(session.tmuxSession)) {
|
|
3088
|
+
featureEvidence.record('monitoring.idleThrottleSettleGate', { kind: 'held', reason: 'throttle-seen-waiting-to-settle', context: { session: session.tmuxSession } });
|
|
3089
|
+
}
|
|
3005
3090
|
if (nextState)
|
|
3006
3091
|
this.idleThrottleSettle.set(session.tmuxSession, nextState);
|
|
3007
3092
|
continue; // Not settled yet — re-sample next idle tick; do NOT emit, and
|
|
@@ -3010,6 +3095,15 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
3010
3095
|
}
|
|
3011
3096
|
// 'fall-through': no current throttle in the settled window (a stale buffer
|
|
3012
3097
|
// line) → clear tracking and proceed to the normal idle machinery below.
|
|
3098
|
+
if (this.idleThrottleSettle.has(session.tmuxSession) || settledSnapshot == null) {
|
|
3099
|
+
// The row the gate exists for: a throttle string that never settled gets no hand-off.
|
|
3100
|
+
if (settledSnapshot == null) {
|
|
3101
|
+
featureEvidence.recordAtMostEvery('monitoring.idleThrottleSettleGate', `read-failed:${session.tmuxSession}`, 3_600_000, { kind: 'error', reason: 'pane-read-failed', context: { session: session.tmuxSession } });
|
|
3102
|
+
}
|
|
3103
|
+
else {
|
|
3104
|
+
featureEvidence.record('monitoring.idleThrottleSettleGate', { kind: 'held', reason: 'throttle-gone-before-settle-no-handoff', context: { session: session.tmuxSession } });
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3013
3107
|
this.idleThrottleSettle.delete(session.tmuxSession);
|
|
3014
3108
|
}
|
|
3015
3109
|
if (!this.idlePromptSince.has(session.id)) {
|
|
@@ -3924,25 +4018,29 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
3924
4018
|
confinedRerouteCapacity() {
|
|
3925
4019
|
const pressure = this.currentMemoryPressure();
|
|
3926
4020
|
const running = this.listRunningSessions();
|
|
3927
|
-
|
|
3928
|
-
|
|
4021
|
+
// Feedback canaries/builds are not scheduler-proven spawns. The early check
|
|
4022
|
+
// must use their actual gate, not the scheduler's reserved global slot.
|
|
4023
|
+
if (running.length + this.pendingHeadlessSpawns >= this.config.maxSessions)
|
|
3929
4024
|
return 'saturated';
|
|
3930
4025
|
if ((this.config.subscriptionPathMode ?? 'off') !== 'force')
|
|
3931
4026
|
return 'not-rerouted';
|
|
3932
|
-
|
|
3933
|
-
return this.countReroutedInteractiveSessions() >= maxRerouted
|
|
4027
|
+
return this.countReroutedInteractiveSessions() >= this.rerouteAdmissionCap(false)
|
|
3934
4028
|
|| pressure === 'high' || pressure === 'critical' ? 'saturated' : 'available';
|
|
3935
4029
|
}
|
|
4030
|
+
rerouteAdmissionCap(scheduledJob) {
|
|
4031
|
+
const maxRerouted = this.config.subscriptionMaxRerouted ?? 3;
|
|
4032
|
+
// A one-slot host cannot reserve without blocking all conversations.
|
|
4033
|
+
return !scheduledJob && maxRerouted > 1 ? maxRerouted - 1 : maxRerouted;
|
|
4034
|
+
}
|
|
3936
4035
|
evaluateRerouteGate(spawnName, scheduledJob = false) {
|
|
3937
4036
|
const mode = this.config.subscriptionPathMode ?? 'off';
|
|
3938
|
-
const maxRerouted = this.config.subscriptionMaxRerouted ?? 3;
|
|
3939
4037
|
const reroutedCount = this.countReroutedInteractiveSessions();
|
|
3940
4038
|
const pressure = this.currentMemoryPressure();
|
|
3941
4039
|
const pressureElevated = pressure === 'high' || pressure === 'critical';
|
|
3942
4040
|
// Keep one of the existing memory-bounded slots for scheduled jobs when
|
|
3943
4041
|
// conversations would otherwise fill the entire lane. A one-slot host
|
|
3944
4042
|
// cannot reserve without blocking all conversations, so retain its cap.
|
|
3945
|
-
const admissionCap =
|
|
4043
|
+
const admissionCap = this.rerouteAdmissionCap(scheduledJob);
|
|
3946
4044
|
if (reroutedCount < admissionCap && !pressureElevated) {
|
|
3947
4045
|
return { allow: true };
|
|
3948
4046
|
}
|
|
@@ -5641,6 +5739,7 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
5641
5739
|
}
|
|
5642
5740
|
catch (err) {
|
|
5643
5741
|
console.warn(`[SessionManager] Failed to record build context for "${tmuxSession}": ${err instanceof Error ? err.message : String(err)}`);
|
|
5742
|
+
featureEvidence.recordAtMostEvery('sessions.respawnBuildContext', `capture-failed|${tmuxSession}`, 60 * 60 * 1000, { kind: 'error', reason: 'capture-failed', context: { tmuxSession, errorName: err instanceof Error ? err.name : 'unknown' } });
|
|
5644
5743
|
}
|
|
5645
5744
|
}
|
|
5646
5745
|
/** Async twin of recordBuildContext — async cwd probe, SAME persistence. */
|
|
@@ -5655,15 +5754,19 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
5655
5754
|
}
|
|
5656
5755
|
catch (err) {
|
|
5657
5756
|
console.warn(`[SessionManager] Failed to record build context for "${tmuxSession}": ${err instanceof Error ? err.message : String(err)}`);
|
|
5757
|
+
featureEvidence.recordAtMostEvery('sessions.respawnBuildContext', `capture-failed|${tmuxSession}`, 60 * 60 * 1000, { kind: 'error', reason: 'capture-failed', context: { tmuxSession, errorName: err instanceof Error ? err.name : 'unknown' } });
|
|
5658
5758
|
}
|
|
5659
5759
|
}
|
|
5660
5760
|
withBuildContextRestoreNote(tmuxSession, initialMessage, resumeSessionId) {
|
|
5661
5761
|
if (!resumeSessionId || !this.buildContextStore)
|
|
5662
5762
|
return initialMessage;
|
|
5663
5763
|
const restore = this.buildContextStore.getRestore(tmuxSession);
|
|
5664
|
-
if (!restore)
|
|
5764
|
+
if (!restore) {
|
|
5765
|
+
featureEvidence.record('sessions.respawnBuildContext', { kind: 'held', reason: 'no-usable-context-on-resume', context: { tmuxSession } });
|
|
5665
5766
|
return initialMessage;
|
|
5767
|
+
}
|
|
5666
5768
|
console.log(`[SessionManager] Restoring build context for "${tmuxSession}" from ${restore.entry.currentCwd}`);
|
|
5769
|
+
featureEvidence.record('sessions.respawnBuildContext', { kind: 'fired', reason: 'context-restored-on-resume', context: { tmuxSession, contextAgeMs: Date.now() - restore.entry.updatedAt } });
|
|
5667
5770
|
return [restore.note, initialMessage].filter(Boolean).join('\n\n');
|
|
5668
5771
|
}
|
|
5669
5772
|
/**
|
|
@@ -7246,6 +7349,8 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
7246
7349
|
this.linkAgentOwnedMemory('claude-code', {}, this.config.projectDir);
|
|
7247
7350
|
// Planned once the triage binary is resolved (below); the env slot needs it first.
|
|
7248
7351
|
let triageThreadline = { transport: 'stdio', reason: 'not-wired', secretEnvFlags: [] };
|
|
7352
|
+
let triageCredentialSource = 'store';
|
|
7353
|
+
let triageAuthFile = null;
|
|
7249
7354
|
const triageBinaryForPlan = resolveFrameworkBinaryPath({
|
|
7250
7355
|
framework: 'claude-code',
|
|
7251
7356
|
frameworkBinaryPaths: this.config.frameworkBinaryPaths,
|
|
@@ -7324,6 +7429,12 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
7324
7429
|
`${this.config.framework ?? 'unset'}). Refusing rather than ` +
|
|
7325
7430
|
'spawning another framework\'s binary with Claude flags.');
|
|
7326
7431
|
}
|
|
7432
|
+
// A key-only agent has no stored login, so triage answered "Not logged in". The key arrives
|
|
7433
|
+
// through a private file, not `-e`, so it stays out of argv (spec cloud-key-internal-calls).
|
|
7434
|
+
triageAuthFile = writeClaudeAuthEnvFile(path.join(this.config.projectDir, '.instar'));
|
|
7435
|
+
triageCredentialSource = triageAuthFile ? 'env' : 'store';
|
|
7436
|
+
if (triageAuthFile)
|
|
7437
|
+
tmuxArgs.push(...claudeAuthExecPrefix(triageAuthFile));
|
|
7327
7438
|
// CMT-798: triage panes are claude-code sessions too — retained copy.
|
|
7328
7439
|
tmuxArgs.push(this.resolveLaunchBinary('claude-code', triageBinary));
|
|
7329
7440
|
// Scoped permissions: allowedTools + permissionMode (NOT --dangerously-skip-permissions)
|
|
@@ -7351,6 +7462,7 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
7351
7462
|
}
|
|
7352
7463
|
}
|
|
7353
7464
|
catch (err) {
|
|
7465
|
+
removeClaudeAuthEnvFile(triageAuthFile);
|
|
7354
7466
|
this.revokeOriginSession(triageSessionId);
|
|
7355
7467
|
throw new Error(`Failed to create triage tmux session: ${this.originSpawnError(err)}`);
|
|
7356
7468
|
}
|
|
@@ -7362,11 +7474,10 @@ rm() { "${shimRunner}" rm "$@"; }
|
|
|
7362
7474
|
tmuxSession,
|
|
7363
7475
|
startedAt: new Date().toISOString(),
|
|
7364
7476
|
maxDurationMinutes: 10,
|
|
7365
|
-
// §2.10 provenance — the
|
|
7366
|
-
//
|
|
7367
|
-
//
|
|
7368
|
-
|
|
7369
|
-
credentialSource: 'store',
|
|
7477
|
+
// §2.10 provenance — 'env' when the configured sign-in key was handed over above, 'store'
|
|
7478
|
+
// otherwise. Set explicitly so no claude-code spawn record is provenance-blind (an env-token
|
|
7479
|
+
// lane that forgot the flag would be a lint-caught bug).
|
|
7480
|
+
credentialSource: triageCredentialSource,
|
|
7370
7481
|
...this.threadlineTransportTag(triageThreadline),
|
|
7371
7482
|
};
|
|
7372
7483
|
this.state.saveSession(session);
|