@overdeck/desktop 0.31.0 → 0.41.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/package.json +1 -1
- package/server/public/assets/{chunk-BO2N2NFS-Cwc4lXp8.js → chunk-BO2N2NFS-66nJvb0Y.js} +4 -4
- package/server/public/assets/{diagram-OG6HWLK6-BV1cva-G.js → diagram-OG6HWLK6-CnpgVLBi.js} +1 -1
- package/server/public/assets/{dist-9_3cMWAu.js → dist-BFQhMul-.js} +3 -3
- package/server/public/assets/{dist-B3-NBXNY.js → dist-CHQsz1no.js} +1 -1
- package/server/public/assets/{ganttDiagram-6RSMTGT7-pdYgAHyY.js → ganttDiagram-6RSMTGT7-CFA1TEUl.js} +1 -1
- package/server/public/assets/{highlighted-body-OFNGDK62-DmF_yp4o.js → highlighted-body-OFNGDK62-DbRNyBRD.js} +1 -1
- package/server/public/assets/index-By2KY9vK.css +1 -0
- package/server/public/assets/index-Cc9hNbWG.js +805 -0
- package/server/public/assets/{linear-DcZ83rN-.js → linear-CveL56V8.js} +1 -1
- package/server/public/assets/mermaid-GHXKKRXX-BM8E6NEr.js +1 -0
- package/server/public/assets/{pieDiagram-4H26LBE5-BzCaErrK.js → pieDiagram-4H26LBE5-BWMp3bl2.js} +1 -1
- package/server/public/assets/{prod-Dgylk8o0.js → prod-BtqEDkif.js} +4 -4
- package/server/public/assets/{quadrantDiagram-W4KKPZXB-BfeRAr-V.js → quadrantDiagram-W4KKPZXB-BXfFUtKT.js} +1 -1
- package/server/public/assets/{sankeyDiagram-5OEKKPKP-DQ6JjCv-.js → sankeyDiagram-5OEKKPKP-D2A4SsFI.js} +1 -1
- package/server/public/assets/{xychartDiagram-2RQKCTM6-B5QvPHe8.js → xychartDiagram-2RQKCTM6-BQuEJ-Sx.js} +1 -1
- package/server/public/index.html +2 -2
- package/server/server.js +439 -158
- package/server/public/assets/index-CtG7LH4D.css +0 -1
- package/server/public/assets/index-DfbVwpxY.js +0 -801
- package/server/public/assets/mermaid-GHXKKRXX-CtuRwlIT.js +0 -1
package/server/server.js
CHANGED
|
@@ -1,93 +1,90 @@
|
|
|
1
|
-
import { a as __toCommonJS, i as __require, o as __toESM, t as __commonJSMin } from "./
|
|
2
|
-
import { C as
|
|
3
|
-
import {
|
|
4
|
-
import { A as getAgentJsonlMtime, B as isTrustedOriginForHost, C as resolveAgentHarness, D as resolvePiSessionPath, E as resolveJsonlPath, F as init_agent_input_detection, G as init_codex_auth, H as validateOrigin$1, I as parseCodexApprovalPrompt, K as httpHandler, L as getHeaderFromMap, M as scanPendingInputsPromise, N as detectAwaitingInputForAgent, O as computeAgentEnrichment, P as detectAwaitingInputFromPaneSync, S as readLauncherPinnedSessionId, T as resolveCodexRolloutPath, U as validateOriginHeaders, W as checkCodexAuthStatus, X as init_http_helpers, Z as jsonResponse, _ as getRuntimeForAgent, a as init_agent_projection, b as init_health, c as init_git_info, d as getSystemHealthSnapshot, f as init_system_health_service, g as init_service, h as getCloisterService, j as init_agent_enrichment, n as init_agents, o as saveAgentStateAndEmitEvent, q as init_http_handler, s as saveAgentStateAndEmitEventProgram, t as agentsRouteLayer, u as resolveConversationGitInfo, v as init_runtimes, w as resolveClaudeSessionId, x as init_jsonl_resolver, y as getAgentHealth, z as init_origin_validation } from "./agents-
|
|
5
|
-
import { a as init_activity_logger, i as emitDashboardLifecycleSync, n as emitActivityEntrySync, r as emitActivityTtsSync } from "./activity-logger-
|
|
6
|
-
import { A as init_paths$1, O as OVERDECK_MIGRATION_PATH, d as getOverdeckDatabaseSync, f as init_infra, i as DbLive, k as getOverdeckDatabasePath, u as TmuxLive } from "./infra-
|
|
7
|
-
import { n as openDatabase, t as init_driver } from "./driver-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { a as
|
|
15
|
-
import {
|
|
16
|
-
import { i as
|
|
17
|
-
import {
|
|
18
|
-
import { n as
|
|
19
|
-
import { i as
|
|
20
|
-
import { n as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { i as
|
|
27
|
-
import { i as
|
|
28
|
-
import { i as
|
|
29
|
-
import { i as
|
|
30
|
-
import { a as
|
|
31
|
-
import { i as
|
|
32
|
-
import { a as
|
|
33
|
-
import { c as
|
|
34
|
-
import {
|
|
35
|
-
import { C as
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { C as
|
|
39
|
-
import { f as
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import { n as
|
|
48
|
-
import {
|
|
49
|
-
import { t as
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import { a as
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import { n as
|
|
69
|
-
import { c as
|
|
70
|
-
import { a as
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import { r as
|
|
79
|
-
import { t as
|
|
80
|
-
import { n as
|
|
81
|
-
import { i as
|
|
82
|
-
import { n as
|
|
83
|
-
import { a as
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import { a as
|
|
87
|
-
import {
|
|
88
|
-
import { i as parseArtifactRef, r as init_forge } from "./forge-DGbYPb6g.js";
|
|
89
|
-
import { a as spawnSequencerAgent, i as init_sequencer_agent, n as clearFinishedSequencerRun, r as getSequencerRunStatus, t as SEQUENCER_AGENT_ID } from "./sequencer-agent-JLfhLLC6.js";
|
|
90
|
-
import { i as listTranscriptCheckpoints, r as getTranscriptCheckpoint$1 } from "./checkpoints-CHIwn3hr.js";
|
|
1
|
+
import { a as __toCommonJS, i as __require, o as __toESM, t as __commonJSMin } from "./rolldown-runtime-DNCzzKnI.js";
|
|
2
|
+
import { C as init_paths, D as sessionFilePath, E as resolveOhmypiExtensionPath, S as getOverdeckHome, T as packageRoot, _ as SYNC_SOURCES, l as LOGS_DIR, o as CLAUDE_DIR, t as AGENTS_DIR, u as OVERDECK_HOME, w as isDevMode, x as getLegacyHome, y as encodeClaudeProjectDir } from "./paths-tknG80xs.js";
|
|
3
|
+
import { A as init_model_capabilities, B as FsError, C as defaultBackgroundAiFeatures, E as MODEL_DEPRECATIONS, F as require_dist$1, H as GitHubApiError, J as TrackerError, K as ProcessSpawnError, M as resolveModelIdSync, N as init_js_yaml, O as getModelEffortLevelsSync, P as jsYaml, S as updateConversationsConfig, T as MODEL_CAPABILITIES, X as init_errors, _ as loadConfigNoMigration, a as ROLE_EFFORTS, b as mergeTtsDaemonConfigs, c as getConversationSearchConfigSync, d as getDefaultTtsDaemonConfig, f as getGlobalConfigPath, g as isTldrEnabledSync, i as PARENT_MODEL_REF, j as modelSupportsImagesSync, k as hasModelCapabilitySync, l as getConversationsConfig, m as isClaudeCodeChannelsEnabled, n as DEFAULT_ROLES, o as clearConfigCache, p as init_config_yaml, r as DEFAULT_WORKHORSES, s as computeModelOrigin, t as COMPLIANCE_MODES, v as loadConfigSync, w as init_registry, x as resolveModel, y as mergeConfigs } from "./config-yaml-DKmldcyb.js";
|
|
4
|
+
import { A as getAgentJsonlMtime, B as isTrustedOriginForHost, C as resolveAgentHarness, D as resolvePiSessionPath, E as resolveJsonlPath, F as init_agent_input_detection, G as init_codex_auth, H as validateOrigin$1, I as parseCodexApprovalPrompt, K as httpHandler, L as getHeaderFromMap, M as scanPendingInputsPromise, N as detectAwaitingInputForAgent, O as computeAgentEnrichment, P as detectAwaitingInputFromPaneSync, S as readLauncherPinnedSessionId, T as resolveCodexRolloutPath, U as validateOriginHeaders, W as checkCodexAuthStatus, X as init_http_helpers, Z as jsonResponse, _ as getRuntimeForAgent, a as init_agent_projection, b as init_health, c as init_git_info, d as getSystemHealthSnapshot, f as init_system_health_service, g as init_service, h as getCloisterService, j as init_agent_enrichment, n as init_agents, o as saveAgentStateAndEmitEvent, q as init_http_handler, s as saveAgentStateAndEmitEventProgram, t as agentsRouteLayer, u as resolveConversationGitInfo, v as init_runtimes, w as resolveClaudeSessionId, x as init_jsonl_resolver, y as getAgentHealth, z as init_origin_validation } from "./agents-cMZF-UTW.js";
|
|
5
|
+
import { a as init_activity_logger, i as emitDashboardLifecycleSync, n as emitActivityEntrySync, r as emitActivityTtsSync } from "./activity-logger-DW1XjyNu.js";
|
|
6
|
+
import { A as init_paths$1, O as OVERDECK_MIGRATION_PATH, d as getOverdeckDatabaseSync, f as init_infra, i as DbLive, k as getOverdeckDatabasePath, u as TmuxLive } from "./infra-uzOlAtyu.js";
|
|
7
|
+
import { n as openDatabase, t as init_driver } from "./driver-CYPr28GN.js";
|
|
8
|
+
import { a as parseIssueIdSync, n as extractPrefixSync, r as init_issue_id } from "./issue-id-9iS2dwrp.js";
|
|
9
|
+
import { E as registerProjectSync, N as setProjectAutoMergeDefaultSync, O as resolveProjectFromIssue, _ as init_projects, b as listProjects, d as getProjectSync, k as resolveProjectFromIssueSync, l as getIssuePrefix, r as extractTeamPrefix, s as findProjectByTeamSync, x as listProjectsSync } from "./projects-9JNVPnww.js";
|
|
10
|
+
import { B as init_ui_theme, D as listSessionNames, F as sessionExists, G as init_child_env, H as BLANKED_PROVIDER_ENV, L as setOption, N as sendKeys, P as sendRawKeystroke, S as isHarnessProcessAlive, U as buildChildEnvSync, V as setUiTheme, W as buildChildEnvWithoutTmuxSync, b as getWindowDimensions, c as ensureManagedTmuxContextOnce, d as exactPaneTarget, i as capturePane, j as resizeWindow, k as listSessionsSync, n as buildTmuxArgs, o as createSession, p as findManagedServerPidSync, w as killSession, x as init_tmux } from "./tmux-fuzPZ-S7.js";
|
|
11
|
+
import { a as init_event_store, i as initEventStore, n as getEventStore, r as getSharedDb } from "./event-store-Dx53k8E7.js";
|
|
12
|
+
import { _ as MemoryObservation, d as PanRpcGroup, f as WS_METHODS, h as EDITORS, i as FlywheelStats, m as FlywheelStatus, n as ContextLayerSaveRequest, p as FlywheelRunId, r as ContextPreviewRequest, t as init_src, u as PanRpcError } from "./src-wyzx0Z0w.js";
|
|
13
|
+
import { _ as setReviewStatus, a as fixStuckCommentedReviews, c as getReviewStatusSync, l as init_review_status, n as clearReviewStatus, o as fixStuckReadyForMerge, r as clearStuckMergeStatuses, s as getReviewStatus, u as loadReviewStatuses } from "./review-status-rO7znkga.js";
|
|
14
|
+
import { a as EventStoreService, c as ReadModelService, d as init_read_model, f as toAgentResolution, i as init_issue_lifecycle, l as ReadModelServiceLive, m as toRole, n as IssueLifecycleLive, o as EventStoreServiceLive, p as toAgentStatus, s as init_domain_services } from "./issue-lifecycle-BIdrF-U5.js";
|
|
15
|
+
import { n as AgentsResolverLive, o as init_agents$1 } from "./agents-BX0F_1V2.js";
|
|
16
|
+
import { i as init_paths$2, l as resolveObservationsFile, r as ensureParentDir, s as resolveIssueMemoryRoot, t as assertMemorySafeSegment } from "./paths-3zDoFwPl.js";
|
|
17
|
+
import { i as recordBriefingSessionStart, n as ensureSessionContextBriefingFile, r as init_briefing_freshness, t as appendFreshBriefingUpdate } from "./briefing-freshness-BVjg7adf.js";
|
|
18
|
+
import { n as listFeatureRegistryEntries, t as init_feature_registry_storage } from "./feature-registry-storage-BjEVR7fj.js";
|
|
19
|
+
import { a as diffAgainstMainFiles, c as diffFilesAgainstHead, d as findCommitAtTime, i as diffAgainstMain, l as diffPatchFilesAgainstHead, m as listCheckpoints, o as diffCheckpointFiles, p as init_checkpoint_manager, s as diffCheckpoints, t as captureCheckpoint, u as diffPatchSinceCommit } from "./checkpoint-manager-B8USYP2J.js";
|
|
20
|
+
import { _ as init_cost, a as init_costs, c as init_reconciler, d as migrateAllSessionsSync, f as getCostsForIssueSync, g as CostResolverLive, h as CostResolver, i as resolveIssueHeadlineCost, l as reconcile, m as syncCacheSync, n as init_running_agents_cache, o as init_sync_wal, p as rebuildCacheSync, r as init_issue_cost_resolver, s as syncWalFromAllProjects, t as getCachedRunningAgents, u as reconcilePiTranscripts } from "./running-agents-cache-bwJnbB6r.js";
|
|
21
|
+
import { i as init_agent_state_service, n as AgentStateServiceLive } from "./agent-state-service-BUhXCI_4.js";
|
|
22
|
+
import { a as init_tracker_config, i as initTrackerConfigCache, n as getLinearApiKey, r as getRallyConfig, t as getGitHubConfig } from "./tracker-config-NzBQEKKo.js";
|
|
23
|
+
import { d as init_typed_errors, l as WorkspaceCreateError, n as AgentStartError, r as BeadsNotInitialized, t as AgentAlreadyRunning, u as WorkspaceNotFound } from "./typed-errors-BRDFMoss.js";
|
|
24
|
+
import { i as init_linear_client, r as LinearClientOptionalLive, t as LinearClient } from "./linear-client-BRwBC1ub.js";
|
|
25
|
+
import { i as init_github_client, r as GitHubClientOptionalLive } from "./github-client-CLhcTuCU.js";
|
|
26
|
+
import { i as init_rally_client, r as RallyClientOptionalLive } from "./rally-client-C51tvXfE.js";
|
|
27
|
+
import { i as resolveGitHubIssueSync, n as init_tracker_utils } from "./tracker-utils-zk9EsKQs.js";
|
|
28
|
+
import { a as CacheService, i as startSharedIssueService, n as init_issue_service_singleton, o as init_cache_service, r as issue_service_singleton_exports, s as parseIntegerHeader, t as getSharedIssueService } from "./issue-service-singleton-Cq0mMaNH.js";
|
|
29
|
+
import { i as ensureInternalTokenSync, s as init_internal_token } from "./internal-token-C8Bg8u5G.js";
|
|
30
|
+
import { a as setPipelineHandlerSync, t as init_pipeline_notifier } from "./pipeline-notifier-BOcC7C98.js";
|
|
31
|
+
import { c as init_review_status_sync, i as getMergeBlockerReconcileCandidates, r as getAllReviewStatusesFromDb } from "./review-status-sync-D1KZJHeS.js";
|
|
32
|
+
import { a as getCostForIssueAggregateSync, c as getDailyTrendsSync, l as getModelRollupSync, n as getBackgroundCostBySourceSync, r as getCavemanExperimentDataSync, s as getCostsByIssueSync, u as init_cost_sync } from "./cost-sync-DJZXPGqK.js";
|
|
33
|
+
import { C as transitionToMerging, _ as markFailed, c as isFlywheelGloballyPaused, d as listDuePendingAutoMerges, f as listProblemAutoMerges, g as markBlocked, n as getActionableAutoMerge, o as init_merge_sync, t as cancelPending, u as listActiveAutoMerges, v as markMerged, x as scheduleAutoMergeWithResult, y as requeueToPending } from "./merge-sync-bO1W7sg-.js";
|
|
34
|
+
import { A as PAN_CONTINUE_FILENAME, I as init_types, _ as findSpecByIssue, a as init_io, j as PAN_DIRNAME, l as readWorkspacePlan, n as findPlan, s as readPlan, y as init_specs } from "./io-BsBjfxgG.js";
|
|
35
|
+
import { C as restartCliproxy, S as readPidFile, T as stopCliproxy, b as isCliproxyInstalled, d as getCliproxyAuthDir, o as bridgeCodexAuthToCliproxy, v as init_cliproxy, w as startCliproxy, x as isCliproxyRunning, y as installCliproxy } from "./cliproxy-shDfFOk1.js";
|
|
36
|
+
import { f as init_config, m as loadConfigSync$1, s as getDashboardApiUrlSync } from "./config-DrT6EhRW.js";
|
|
37
|
+
import { n as require_auth_errors, r as require_token_error, t as require_token_util } from "./token-util-CROoF5ic.js";
|
|
38
|
+
import { $ as updateForkStatus, A as listArchivedConversationsWithEnrichment, C as getStuckForks, D as init_conversations, E as incrementForkRetryCount, F as markConversationRunning, G as setFavorite, H as setConversationClaudeSessionId, J as unarchiveConversation, K as setForkRequest, M as listFavoritedIds, N as markConversationActive, O as isAgentConversationName, P as markConversationEnded, Q as updateConversationTitle, R as recordConversationHandoff, S as getConversationByTmuxSession, T as importLegacyConversation, U as setConversationHarness, V as setClearedToConvId, W as setConversationModel, X as updateConversationDeliveryMethod, Y as updateConversationCost, Z as updateConversationForkFallbackReason, _ as canReplaceTitle, b as getConversationById, et as updateLastAttached, g as backfillConversationModel, h as archiveConversation, j as listConversations, k as listActiveConversations, q as setImportedConversationLinks, tt as updateSpawnError, v as createConversation, w as hasOtherActiveConversationOnTmuxSession, x as getConversationByName, y as getConversationByClaudeSessionId, z as removeFavorite } from "./conversations-Db3UIeTM.js";
|
|
39
|
+
import { _ as init_codex_conversation_parser, a as init_conversation_service, c as parseFromLastCompactBoundary, d as init_ohmypi_conversation_parser, f as isOhmypiSessionFile, g as parsePiConversationMessages, h as isPiSessionFile, i as gateSnapshotEmission, l as summarizeConversationActivity, m as init_pi_conversation_parser, n as contextUsageFromParseResult, o as parseConversationMessages, p as parseOhmypiConversationMessages, t as computeContextUsage, u as watchConversation, v as parseCodexConversationMessages } from "./conversation-service-IG9dJkAf.js";
|
|
40
|
+
import { i as getClaudePermissionFlagsStringSync, o as init_claude_permissions, s as resolvePermissionModeSync, t as BYPASS_PERMISSION_MODE } from "./claude-permissions-BqmkURDk.js";
|
|
41
|
+
import { l as init_codex, s as findRolloutPath } from "./codex-Bj_hftHG.js";
|
|
42
|
+
import { $t as init_claude_auth, A as getAgentStateFilePath, At as init_operator_interventions, B as init_agents$2, Bt as init_pty_token, C as dismissDevChannelsDialog, D as getAgentRuntimeState, Dt as captureTranscriptUserRecordSnapshot, E as getAgentRuntimeBaseCommand, Et as writeChannelsBridgeMcpConfig, F as getProviderEnvForModel, G as listAgentStates, Ht as init_bridge_token, I as getProviderExportsForModel, K as listRunningAgents, O as getAgentRuntimeStateSync, Ot as init_transcript_landing, P as getProviderAuthMode, Qt as getClaudeAuthStatus, Rt as init_pi_fifo, St as waitForReadySignal, T as getAgentDir, Ut as writeBridgeTokenSync, V as injectPiConversationMemory, Vt as writePtyToken, Xt as init_agent_record_sync, Z as messageAgent, Zt as readAgentHarnessModelRecordSync, en as getOpenAIAuthStatus, h as clearReadySignal, j as getAgentStateSync, jt as operatorInterventionEvent, k as getAgentState, kt as probeTranscriptSince, tn as init_openai_auth, v as deliverAgentMessage, zt as piFifoPaths } from "./agents-SteL0Yy7.js";
|
|
43
|
+
import { a as getBuiltInDefaultHarness, c as getProviderForModelSync, l as init_providers, o as getKimiAnthropicBaseUrl, u as piProviderForModel } from "./providers-Cju7HorZ.js";
|
|
44
|
+
import { n as isBackgroundFeatureEnabled, t as init_features } from "./features-BsiM65ZI.js";
|
|
45
|
+
import { i as init_settings, r as getMemoryWorkerConcurrency, t as areMemoryObservationsEnabled } from "./settings-s_9BJkQW.js";
|
|
46
|
+
import { t as init_pan_dir } from "./pan-dir-CnOUvQm_.js";
|
|
47
|
+
import { n as init_launcher_generator, t as generateLauncherScriptSync } from "./launcher-generator-Bzj8tdlM.js";
|
|
48
|
+
import { a as globalContextFile$1, d as workspaceContextFile, l as projectContextFile, n as codexGlobalContextFile, o as init_layers, r as ensureProjectLayer, s as piGlobalContextFile } from "./layers-0Zw11iHd.js";
|
|
49
|
+
import { i as init_harness_policy, n as resolveHarness, r as canUseHarnessSync, t as init_harness_resolve } from "./harness-resolve-C1dMLCfn.js";
|
|
50
|
+
import { c as init_docker_stats } from "./stack-health-DEdzAjBZ.js";
|
|
51
|
+
import { i as updateMemoryHealth, n as extractWithProviderPolicy, r as init_health$1, t as init_providers$1 } from "./providers-BjJWJ-lN.js";
|
|
52
|
+
import { a as getSetting, b as setSetting, c as isDeaconGloballyPausedSync, d as isFlywheelRequireUatBeforeMerge, f as isMergeTrainEnabled, g as setFlywheelAutoPickupBacklog, l as isFlywheelAutoPickupBacklog, m as setDeaconGloballyPausedSync, o as init_control_settings, u as isFlywheelGloballyPaused$1, v as setFlywheelRequireUatBeforeMerge, y as setMergeTrainEnabled } from "./control-settings-ddYZWzH3.js";
|
|
53
|
+
import { a as parseRelativeTime, n as CostThresholdError, s as embed } from "./scanner-DVDpIEUb.js";
|
|
54
|
+
import { n as deduplicateEventsSync, o as readEventsSync, s as tailEventsSync } from "./events-BXe36mwW.js";
|
|
55
|
+
import { n as recordBackgroundAiCost, t as init_cost$1 } from "./cost-RWt0c0ft.js";
|
|
56
|
+
import { a as startUatTrainReconciler, c as openFlywheelRunReportForDashboard, d as resumeFlywheelRunForDashboard, f as startFlywheelRunForDashboard, l as pauseFlywheelRunForDashboard, o as stopUatTrainReconciler, p as runDashboardDbJob, s as abortFlywheelRunForDashboard, u as readCurrentFlywheelStatusForDashboard } from "./uat-train-n8HCRtcj.js";
|
|
57
|
+
import { S as subscribeLatestFlywheelStatus, _ as listFlywheelRuns, g as isFlywheelRunId, h as init_flywheel_run_state, l as buildClassifyLookups, p as getFlywheelRunDetail, u as init_lookups, w as writeLatestFlywheelStatus, x as resolveLiveFlywheelRunId, y as readCurrentLatestFlywheelStatus } from "./flywheel-Dn6Akk0c.js";
|
|
58
|
+
import { f as workspacesRouteLayer, g as getWorkspacePathForIssue, h as processPendingFeedbackDeliveries, m as resumeQueuedMerges, p as enrichReviewStatus } from "./workspaces-B8dRF3nB.js";
|
|
59
|
+
import { _ as init_platform, g as detectPlatform } from "./workspace-manager-C-2qis5x.js";
|
|
60
|
+
import { a as getShadowState, s as init_shadow_state } from "./shadow-state-CH4do7Wh.js";
|
|
61
|
+
import { C as init_dashboard_auth, D as init_review_status$1, E as rejectUnsafeDashboardMutationRequest, S as hasDashboardInternalToken, T as rejectUnauthorizedDashboardSessionMintRequest, _ as groupResourceAllocatedIssuesByProject, b as dashboardCsrfToken, g as getCachedResourceAllocatedIssues, m as issuesRouteLayer, p as init_issues, v as init_resource_discovery, w as rejectUnauthorizedDashboardRequest, x as dashboardSessionCookieHeader, y as sanitizeResourceAllocatedIssues } from "./issues-DGG1xJ9W.js";
|
|
62
|
+
import { a as loadCloisterConfigSync, i as loadCloisterConfig, o as saveCloisterConfigSync, r as init_config$1, s as shouldAutoStart } from "./config-DijD5z28.js";
|
|
63
|
+
import { O as init_specialists, b as getReviewerSessionName } from "./specialists-CRQv_8TC.js";
|
|
64
|
+
import { H as init_deacon, _t as emergencyBrake, ct as setAgentStoppedNotifier, gt as withConcurrencyLimit, ht as init_concurrency$1, i as autoResumeStoppedWorkAgents, lt as setMergeReadyNotifier, rt as resetPatrolHeartbeatForStartup, st as setAgentStatusChangedNotifier, vt as init_concurrency } from "./deacon-B1xw9Xx2.js";
|
|
65
|
+
import { n as getNoResumeMode, r as init_no_resume_mode, t as disableNoResumeMode } from "./no-resume-mode-DlMPigWY.js";
|
|
66
|
+
import { c as init_prd_locations, s as findPrdAtStatusSync } from "./archive-planning-CgavlD03.js";
|
|
67
|
+
import { a as writeFeedbackFile, i as init_feedback_writer } from "./feedback-writer-0v4RHIwO.js";
|
|
68
|
+
import { n as parseSequenceMd, r as writeSequenceMd, t as init_sequence_io } from "./sequence-io-0WGOYOmb.js";
|
|
69
|
+
import { _ as computeStats, b as normalizeGate, c as BLOCKS_MAIN_LABEL, d as READY_LABEL, f as RELEASED_LABEL, g as computeLanes, h as computeCohort, l as OBJECTION_LABEL, m as classifyIssue, p as VETOED_LABEL, u as PARKED_LABEL, v as computeWaves, y as init_pickup } from "./flywheel-merge-order-C_hlPfAU.js";
|
|
70
|
+
import { _ as sendToRemoteAgent, a as getRemoteAgentOutput, n as checkRemoteSpendCap, o as init_remote_agents, p as loadRemoteAgentState, u as killRemoteAgent, v as spawnRemoteAgent } from "./remote-agents-Ckw0Uup4.js";
|
|
71
|
+
import { _ as init_git_activity, v as listGitOperationsSync } from "./merge-agent-Chd_Rt2n.js";
|
|
72
|
+
import { n as getTldrDaemonServiceSync, r as init_tldr_daemon } from "./tldr-daemon-C4f0Cv5Z.js";
|
|
73
|
+
import { i as runMemoryFtsTransaction, n as init_fts_db, r as runMemoryFtsStatement, t as closeMemoryFtsDatabases } from "./fts-db-ByIkpwNP.js";
|
|
74
|
+
import { c as init_pending, l as maybeTriggerStatusRollup, o as readRecentObservations, r as init_rollup, u as writePendingTurn } from "./rollup-BliEel5D.js";
|
|
75
|
+
import { r as specialistsRouteLayer } from "./specialists-CDM5vkDy.js";
|
|
76
|
+
import { t as getAgentCommandSync } from "./settings-BYAK9dF4.js";
|
|
77
|
+
import { n as init_review_agent, r as isExtendedReviewEnabled } from "./review-agent-DlkjIM6c.js";
|
|
78
|
+
import { i as isRemoteAvailable, r as init_remote, t as createFlyProviderFromConfig } from "./remote-Cu-ROCd0.js";
|
|
79
|
+
import { n as init_claude_settings_overlay, t as detectProviderEnvConflicts } from "./claude-settings-overlay-Ck8qNezZ.js";
|
|
80
|
+
import { a as init_query_expansion, i as clearQueryExpansionCache, n as init_injection, o as buildMatchQuery, r as injectPromptTimeMemory, s as init_search } from "./injection-Bv8oh7WW.js";
|
|
81
|
+
import { _ as init_transcript_adapter, a as generateFallbackSummary, c as handoffPreconditionFallbackReason, d as prependFallbackFocus, f as requestHandoffFromAgent, g as getTranscriptAdapter, i as copySessionFromCompactBoundary, l as init_summary_fork, o as generateSummaryForFork, p as reserveSummaryForkSession, r as authorHandoffExternal, s as handoffFailureReason, u as logHandoffFallback } from "./summary-fork-gcj_CR2I.js";
|
|
82
|
+
import { a as init_conversation_compaction, c as shouldInterceptManualCompact, n as compactConversationNative, o as isCompacting } from "./conversation-compaction-dqaXGhcH.js";
|
|
83
|
+
import { a as init_render, d as validateTemplate, i as hasManagedRegion, l as init_harness, o as userContentOutsideRegion, t as init_context_layers, u as renderForHarness } from "./context-layers-SF7iOUH9.js";
|
|
84
|
+
import { c as init_github_app, s as getPullRequestState } from "./github-app-DgISqJqI.js";
|
|
85
|
+
import { i as parseArtifactRef, r as init_forge } from "./forge-mcRx-ba-.js";
|
|
86
|
+
import { a as spawnSequencerAgent, i as init_sequencer_agent, n as clearFinishedSequencerRun, r as getSequencerRunStatus, t as SEQUENCER_AGENT_ID } from "./sequencer-agent-DZgob0vQ.js";
|
|
87
|
+
import { i as listTranscriptCheckpoints, r as getTranscriptCheckpoint$1 } from "./checkpoints-D9IV1yvV.js";
|
|
91
88
|
import { createRequire } from "node:module";
|
|
92
89
|
import { Cause, Context, Data, Effect, Exit, Fiber, FileSystem, Layer, Option, Path, Queue, Result, Schedule, Schema, Stream } from "effect";
|
|
93
90
|
import { createReadStream, createWriteStream, existsSync, fstatSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
@@ -102,7 +99,7 @@ import { createHash, randomUUID } from "crypto";
|
|
|
102
99
|
import * as sp from "node:path";
|
|
103
100
|
import { basename as basename$1, delimiter, dirname as dirname$1, extname as extname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, relative as relative$1, resolve as resolve$1, sep as sep$1 } from "node:path";
|
|
104
101
|
import { chmod as chmod$1, mkdir as mkdir$1, open as open$1, readFile as readFile$1, readdir as readdir$1, rename as rename$1, stat as stat$2, unlink as unlink$1, writeFile as writeFile$1 } from "fs/promises";
|
|
105
|
-
import { createHmac, randomBytes
|
|
102
|
+
import { createHmac, randomBytes, randomUUID as randomUUID$1, timingSafeEqual } from "node:crypto";
|
|
106
103
|
import { exec, execFile, execFileSync, execSync, spawn } from "node:child_process";
|
|
107
104
|
import { promisify } from "node:util";
|
|
108
105
|
import * as pty from "@homebridge/node-pty-prebuilt-multiarch";
|
|
@@ -631,7 +628,7 @@ const AgentSpawnerLive = Layer.effect(AgentSpawner, Effect.sync(() => ({
|
|
|
631
628
|
const beadsDir = join$1(workspacePath, ".beads");
|
|
632
629
|
const projectBeadsDir = join$1(workspacePath, "..", "..", ".beads");
|
|
633
630
|
if (!(existsSync$1(beadsDir) || existsSync$1(projectBeadsDir))) throw new BeadsNotInitialized({ workspace: workspacePath });
|
|
634
|
-
const { getAgentState, spawnAgent, normalizeAgentId } = await import("./agents-
|
|
631
|
+
const { getAgentState, spawnAgent, normalizeAgentId } = await import("./agents-BeWOeR_m.js");
|
|
635
632
|
const normalizedId = normalizeAgentId(issueId);
|
|
636
633
|
if ((await Effect.runPromise(getAgentState(normalizedId)))?.status === "running") throw new AgentAlreadyRunning({ id: issueId });
|
|
637
634
|
return {
|
|
@@ -662,7 +659,7 @@ const AgentSpawnerLive = Layer.effect(AgentSpawner, Effect.sync(() => ({
|
|
|
662
659
|
const { workspacePath, projectPath, issue } = opts;
|
|
663
660
|
if (!existsSync$1(workspacePath)) throw new WorkspaceNotFound({ id: issueId });
|
|
664
661
|
const sessionName = opts.sessionName ?? `planning-${issueId.toLowerCase()}`;
|
|
665
|
-
const { spawnPlanningSession } = await import("./spawn-planning-session-
|
|
662
|
+
const { spawnPlanningSession } = await import("./spawn-planning-session-HmyOU9y0.js");
|
|
666
663
|
const result = await spawnPlanningSession({
|
|
667
664
|
issue: {
|
|
668
665
|
id: issue.id,
|
|
@@ -695,14 +692,14 @@ const AgentSpawnerLive = Layer.effect(AgentSpawner, Effect.sync(() => ({
|
|
|
695
692
|
}),
|
|
696
693
|
kill: (agentId) => Effect.tryPromise({
|
|
697
694
|
try: async () => {
|
|
698
|
-
const { stopAgent } = await import("./agents-
|
|
695
|
+
const { stopAgent } = await import("./agents-BeWOeR_m.js");
|
|
699
696
|
await Effect.runPromise(stopAgent(agentId));
|
|
700
697
|
},
|
|
701
698
|
catch: () => void 0
|
|
702
699
|
}).pipe(Effect.ignore),
|
|
703
700
|
message: (agentId, msg) => Effect.tryPromise({
|
|
704
701
|
try: async () => {
|
|
705
|
-
const { messageAgent } = await import("./agents-
|
|
702
|
+
const { messageAgent } = await import("./agents-BeWOeR_m.js");
|
|
706
703
|
await messageAgent(agentId, msg);
|
|
707
704
|
},
|
|
708
705
|
catch: (err) => new AgentStartError({
|
|
@@ -713,8 +710,8 @@ const AgentSpawnerLive = Layer.effect(AgentSpawner, Effect.sync(() => ({
|
|
|
713
710
|
}),
|
|
714
711
|
deepWipe: (issueId, opts) => Effect.tryPromise({
|
|
715
712
|
try: async () => {
|
|
716
|
-
const { deepWipe } = await import("./workflows-
|
|
717
|
-
const { resolveProjectFromIssueSync } = await import("./projects-
|
|
713
|
+
const { deepWipe } = await import("./workflows-BGSPZ2WT.js");
|
|
714
|
+
const { resolveProjectFromIssueSync } = await import("./projects-Bx1iT8WM.js");
|
|
718
715
|
const project = resolveProjectFromIssueSync(issueId);
|
|
719
716
|
const projectPath = project?.projectPath ?? process.cwd();
|
|
720
717
|
await Effect.runPromise(deepWipe({
|
|
@@ -770,8 +767,8 @@ const WorkspaceServiceLive = Layer.effect(WorkspaceService, Effect.sync(() => {
|
|
|
770
767
|
const { workspacePath, branch } = getWorkspacePath(issueId);
|
|
771
768
|
const issueLower = issueId.toLowerCase();
|
|
772
769
|
if (existsSync$1(workspacePath)) return workspacePath;
|
|
773
|
-
const { createWorkspace } = await import("./workspace-manager-
|
|
774
|
-
const { loadProjectsConfigSync } = await import("./projects-
|
|
770
|
+
const { createWorkspace } = await import("./workspace-manager-B7Ji7R9Y.js");
|
|
771
|
+
const { loadProjectsConfigSync } = await import("./projects-Bx1iT8WM.js");
|
|
775
772
|
const { projects } = loadProjectsConfigSync();
|
|
776
773
|
const project = resolveProjectFromIssueSync(issueId);
|
|
777
774
|
if (!project) throw new WorkspaceCreateError({
|
|
@@ -806,7 +803,7 @@ const WorkspaceServiceLive = Layer.effect(WorkspaceService, Effect.sync(() => {
|
|
|
806
803
|
const { workspacePath } = getWorkspacePath(issueId);
|
|
807
804
|
const issueLower = issueId.toLowerCase();
|
|
808
805
|
if (!existsSync$1(workspacePath)) throw new WorkspaceNotFound({ id: issueId });
|
|
809
|
-
const { removeWorkspace } = await import("./workspace-manager-
|
|
806
|
+
const { removeWorkspace } = await import("./workspace-manager-B7Ji7R9Y.js");
|
|
810
807
|
const project = resolveProjectFromIssueSync(issueId);
|
|
811
808
|
if (!project) throw new WorkspaceCreateError({
|
|
812
809
|
id: issueId,
|
|
@@ -837,7 +834,7 @@ const WorkspaceServiceLive = Layer.effect(WorkspaceService, Effect.sync(() => {
|
|
|
837
834
|
try: async () => {
|
|
838
835
|
const { workspacePath } = getWorkspacePath(issueId);
|
|
839
836
|
const issueLower = issueId.toLowerCase();
|
|
840
|
-
const { stopWorkspaceDocker } = await import("./workspace-manager-
|
|
837
|
+
const { stopWorkspaceDocker } = await import("./workspace-manager-B7Ji7R9Y.js");
|
|
841
838
|
await Effect.runPromise(stopWorkspaceDocker(workspacePath, issueLower));
|
|
842
839
|
},
|
|
843
840
|
catch: () => void 0
|
|
@@ -906,7 +903,7 @@ const WorkspaceServiceLive = Layer.effect(WorkspaceService, Effect.sync(() => {
|
|
|
906
903
|
join$1(workspacePath, ".devcontainer", "docker-compose.devcontainer.yml")
|
|
907
904
|
];
|
|
908
905
|
if (!composePaths.find((p) => existsSync$1(p))) {
|
|
909
|
-
const { ensureDevcontainerSync } = await import("./ensure-devcontainer-
|
|
906
|
+
const { ensureDevcontainerSync } = await import("./ensure-devcontainer-DLZ2bnuQ.js");
|
|
910
907
|
const ensure = ensureDevcontainerSync({
|
|
911
908
|
workspacePath,
|
|
912
909
|
issueId
|
|
@@ -3176,7 +3173,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3176
3173
|
const http$1 = __require("http");
|
|
3177
3174
|
const net = __require("net");
|
|
3178
3175
|
const tls = __require("tls");
|
|
3179
|
-
const { randomBytes: randomBytes$
|
|
3176
|
+
const { randomBytes: randomBytes$1, createHash: createHash$3 } = __require("crypto");
|
|
3180
3177
|
const { Duplex: Duplex$2, Readable: Readable$1 } = __require("stream");
|
|
3181
3178
|
const { URL: URL$1 } = __require("url");
|
|
3182
3179
|
const PerMessageDeflate = require_permessage_deflate();
|
|
@@ -3731,7 +3728,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3731
3728
|
}
|
|
3732
3729
|
}
|
|
3733
3730
|
const defaultPort = isSecure ? 443 : 80;
|
|
3734
|
-
const key = randomBytes$
|
|
3731
|
+
const key = randomBytes$1(16).toString("base64");
|
|
3735
3732
|
const request = isSecure ? https.request : http$1.request;
|
|
3736
3733
|
const protocolSet = /* @__PURE__ */ new Set();
|
|
3737
3734
|
let perMessageDeflate;
|
|
@@ -15928,7 +15925,7 @@ var require_get_vercel_oidc_token = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
15928
15925
|
err = error;
|
|
15929
15926
|
}
|
|
15930
15927
|
try {
|
|
15931
|
-
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await import("./token-util-
|
|
15928
|
+
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await import("./token-util-xNaV-00f.js").then((m) => /* @__PURE__ */ __toESM(m.default)), await import("./token-mVJcOeCq.js").then((m) => /* @__PURE__ */ __toESM(m.default))]);
|
|
15932
15929
|
if (!token || isExpired(getTokenPayload(token), options?.expirationBufferMs)) {
|
|
15933
15930
|
await refreshToken(options);
|
|
15934
15931
|
token = getVercelOidcTokenSync();
|
|
@@ -28245,7 +28242,7 @@ var GoogleCloudTranscription = class {
|
|
|
28245
28242
|
}
|
|
28246
28243
|
async start(apiKey, model) {
|
|
28247
28244
|
try {
|
|
28248
|
-
const { SpeechClient } = await import("./src-
|
|
28245
|
+
const { SpeechClient } = await import("./src-BuEHMMFm.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then((module) => module.v1p1beta1 ?? module.v1);
|
|
28249
28246
|
if (this.closed) return;
|
|
28250
28247
|
const stream = new SpeechClient({ apiKey }).streamingRecognize({
|
|
28251
28248
|
config: {
|
|
@@ -28932,6 +28929,7 @@ init_providers();
|
|
|
28932
28929
|
init_openai_auth();
|
|
28933
28930
|
init_claude_auth();
|
|
28934
28931
|
init_launcher_generator();
|
|
28932
|
+
init_agent_record_sync();
|
|
28935
28933
|
init_layers();
|
|
28936
28934
|
init_bridge_token();
|
|
28937
28935
|
init_pty_token();
|
|
@@ -29677,11 +29675,13 @@ const PanRpcLayer = PanRpcGroup.toLayer(Effect.gen(function* () {
|
|
|
29677
29675
|
if (!conv && /^(agent-|planning-|specialist-)/.test(input.conversationName)) {
|
|
29678
29676
|
const harness = yield* Effect.promise(() => resolveAgentHarness(input.conversationName));
|
|
29679
29677
|
if (harness === "ohmypi") return streamResolvedFullParseSnapshots(() => resolvePiSessionPath(input.conversationName), parseOhmypiConversationMessages, null);
|
|
29678
|
+
if (harness === "pi") return streamResolvedFullParseSnapshots(() => resolvePiSessionPath(input.conversationName), parsePiConversationMessages, null);
|
|
29680
29679
|
if (harness === "codex") return streamResolvedFullParseSnapshots(() => resolveCodexRolloutPath(input.conversationName), parseCodexConversationMessages, null);
|
|
29681
29680
|
return conversationDiscoveringStream();
|
|
29682
29681
|
}
|
|
29683
29682
|
if (!conv) return conversationDiscoveringStream();
|
|
29684
29683
|
if (conv.harness === "ohmypi") return streamResolvedFullParseSnapshots(() => resolvePiSessionPath(conv.tmuxSession), parseOhmypiConversationMessages, conv.model ?? null, true);
|
|
29684
|
+
if (conv.harness === "pi") return streamResolvedFullParseSnapshots(() => resolvePiSessionPath(conv.tmuxSession), parsePiConversationMessages, conv.model ?? null, true);
|
|
29685
29685
|
if (conv.harness === "codex") return streamResolvedFullParseSnapshots(() => resolveCodexRolloutPath(conv.tmuxSession), parseCodexConversationMessages, conv.model ?? null, true);
|
|
29686
29686
|
if (conv.harness !== "claude-code" && conv.harness != null) return conversationDiscoveringStream();
|
|
29687
29687
|
const launcherTmuxSession = conv.tmuxSession;
|
|
@@ -30609,6 +30609,47 @@ const getContainerLogsRoute = HttpRouter.add("GET", "/api/resources/docker/conta
|
|
|
30609
30609
|
})));
|
|
30610
30610
|
const resourcesRouteLayer = Layer.mergeAll(getResourcesRoute, getContainerHistoryRoute, getContainerDetailsRoute, deleteDockerContainerRoute, postPruneContainersRoute, deleteDockerNetworkRoute, deleteDockerVolumeRoute, postPruneVolumesRoute, postRestartContainerRoute, postStartContainerRoute, getContainerLogsRoute);
|
|
30611
30611
|
//#endregion
|
|
30612
|
+
//#region services/model-origin-enrich.ts
|
|
30613
|
+
init_agents$2();
|
|
30614
|
+
init_config_yaml();
|
|
30615
|
+
/**
|
|
30616
|
+
* Map a session-node type to the pipeline Role whose model distribution it draws
|
|
30617
|
+
* from. Returns null for types that never sample a top-level weighted role
|
|
30618
|
+
* distribution: 'reviewer' (sub-role convoy — resolves via a sub-role scalar),
|
|
30619
|
+
* 'legacy', and anything unrecognized.
|
|
30620
|
+
*/
|
|
30621
|
+
function sessionTypeToModelRole(type) {
|
|
30622
|
+
switch (type) {
|
|
30623
|
+
case "work": return "work";
|
|
30624
|
+
case "review": return "review";
|
|
30625
|
+
case "test": return "test";
|
|
30626
|
+
case "ship":
|
|
30627
|
+
case "merge": return "ship";
|
|
30628
|
+
case "planning": return "plan";
|
|
30629
|
+
case "strike": return "strike";
|
|
30630
|
+
default: return null;
|
|
30631
|
+
}
|
|
30632
|
+
}
|
|
30633
|
+
/**
|
|
30634
|
+
* Mutate `sections` in place, attaching `modelOrigin` to each node whose role uses
|
|
30635
|
+
* a weighted distribution. Scalar roles are left untouched (the client renders the
|
|
30636
|
+
* resolved model with no bars/hash). Reconstructs the spawn key from the agent's
|
|
30637
|
+
* persisted `modelSpawnKey` (exact) or, for pre-PAN-2053 agents, `${role}:${issueId}`.
|
|
30638
|
+
* Wrapped so a config/state error can never break the tree.
|
|
30639
|
+
*/
|
|
30640
|
+
function enrichSessionsWithModelOrigin(sections, fallbackIssueId) {
|
|
30641
|
+
try {
|
|
30642
|
+
const { config } = loadConfigSync();
|
|
30643
|
+
for (const section of sections) {
|
|
30644
|
+
const role = sessionTypeToModelRole(section.type);
|
|
30645
|
+
if (!role) continue;
|
|
30646
|
+
const state = getAgentStateSync(section.sessionId);
|
|
30647
|
+
const origin = computeModelOrigin(role, state?.modelSpawnKey ?? `${role}:${state?.issueId ?? fallbackIssueId}`, config);
|
|
30648
|
+
if (origin) section.modelOrigin = origin;
|
|
30649
|
+
}
|
|
30650
|
+
} catch {}
|
|
30651
|
+
}
|
|
30652
|
+
//#endregion
|
|
30612
30653
|
//#region services/session-presence.ts
|
|
30613
30654
|
/**
|
|
30614
30655
|
* Derive session presence from runtime state, tmux session existence, and recent activity.
|
|
@@ -30817,7 +30858,27 @@ function normalizeRolesConfig(roles) {
|
|
|
30817
30858
|
for (const [role, roleConfig] of Object.entries(roles)) normalized[role] = normalizeRoleConfig(roleConfig);
|
|
30818
30859
|
return normalized;
|
|
30819
30860
|
}
|
|
30820
|
-
function validateModelRef(fieldPath, ref, effectiveWorkhorses, errors, warnings, allowWorkhorseRef, allowParentRef = false) {
|
|
30861
|
+
function validateModelRef(fieldPath, ref, effectiveWorkhorses, errors, warnings, allowWorkhorseRef, allowParentRef = false, allowDistribution = false) {
|
|
30862
|
+
if (Array.isArray(ref)) {
|
|
30863
|
+
if (!allowDistribution) {
|
|
30864
|
+
errors.push(`${fieldPath} distribution not allowed here; must be a scalar model reference`);
|
|
30865
|
+
return;
|
|
30866
|
+
}
|
|
30867
|
+
if (ref.length === 0) {
|
|
30868
|
+
errors.push(`${fieldPath} distribution must be a non-empty array`);
|
|
30869
|
+
return;
|
|
30870
|
+
}
|
|
30871
|
+
for (let i = 0; i < ref.length; i++) {
|
|
30872
|
+
const entry = ref[i];
|
|
30873
|
+
if (!isRecord$3(entry)) {
|
|
30874
|
+
errors.push(`${fieldPath}[${i}] must be an object with model and weight`);
|
|
30875
|
+
continue;
|
|
30876
|
+
}
|
|
30877
|
+
if (!Number.isInteger(entry.weight) || entry.weight <= 0) errors.push(`${fieldPath}[${i}].weight must be a positive integer`);
|
|
30878
|
+
validateModelRef(`${fieldPath}[${i}].model`, entry.model, effectiveWorkhorses, errors, warnings, allowWorkhorseRef);
|
|
30879
|
+
}
|
|
30880
|
+
return;
|
|
30881
|
+
}
|
|
30821
30882
|
if (typeof ref !== "string" || ref.trim() === "") {
|
|
30822
30883
|
errors.push(`${fieldPath} must be a non-empty model reference`);
|
|
30823
30884
|
return;
|
|
@@ -30887,14 +30948,24 @@ function validateWorkhorsesAndRoles(settings, errors, warnings) {
|
|
|
30887
30948
|
errors.push(`roles.${role}.model must be a non-empty model reference`);
|
|
30888
30949
|
continue;
|
|
30889
30950
|
}
|
|
30890
|
-
validateModelRef(`roles.${role}.model`, rawRoleConfig.model, effectiveWorkhorses, errors, warnings, true);
|
|
30951
|
+
validateModelRef(`roles.${role}.model`, rawRoleConfig.model, effectiveWorkhorses, errors, warnings, true, false, true);
|
|
30891
30952
|
validateRoleFields(`roles.${role}`, rawRoleConfig, errors);
|
|
30892
30953
|
const effort = rawRoleConfig.effort;
|
|
30893
30954
|
if (typeof effort === "string" && ROLE_EFFORTS.includes(effort)) {
|
|
30894
|
-
const
|
|
30895
|
-
if (
|
|
30896
|
-
const
|
|
30897
|
-
if (
|
|
30955
|
+
const modelRef = rawRoleConfig.model ?? DEFAULT_ROLES[role]?.model;
|
|
30956
|
+
if (Array.isArray(modelRef)) for (const entry of modelRef) {
|
|
30957
|
+
const resolvedModel = resolveModelRefToId(entry.model, effectiveWorkhorses);
|
|
30958
|
+
if (resolvedModel) {
|
|
30959
|
+
const supported = getModelEffortLevelsSync(resolvedModel);
|
|
30960
|
+
if (supported !== void 0 && !supported.includes(effort)) errors.push(`roles.${role}.effort '${effort}' is not supported by ${resolvedModel} (supported: ${supported.join(", ")})`);
|
|
30961
|
+
}
|
|
30962
|
+
}
|
|
30963
|
+
else {
|
|
30964
|
+
const resolvedModel = resolveModelRefToId(modelRef, effectiveWorkhorses);
|
|
30965
|
+
if (resolvedModel) {
|
|
30966
|
+
const supported = getModelEffortLevelsSync(resolvedModel);
|
|
30967
|
+
if (supported !== void 0 && !supported.includes(effort)) errors.push(`roles.${role}.effort '${effort}' is not supported by ${resolvedModel} (supported: ${supported.join(", ")})`);
|
|
30968
|
+
}
|
|
30898
30969
|
}
|
|
30899
30970
|
}
|
|
30900
30971
|
if (rawRoleConfig.sub !== void 0) if (!isRecord$3(rawRoleConfig.sub)) errors.push(`roles.${role}.sub must be an object`);
|
|
@@ -31768,6 +31839,7 @@ init_agents$2();
|
|
|
31768
31839
|
init_costs();
|
|
31769
31840
|
init_tmux();
|
|
31770
31841
|
init_projects();
|
|
31842
|
+
init_config_yaml();
|
|
31771
31843
|
init_http_handler();
|
|
31772
31844
|
init_jsonl_resolver();
|
|
31773
31845
|
const execAsync$5 = promisify(exec);
|
|
@@ -32104,6 +32176,7 @@ async function fetchActivityDataWithContext(issueId, context = {}) {
|
|
|
32104
32176
|
if (!b.startedAt) return -1;
|
|
32105
32177
|
return a.startedAt.localeCompare(b.startedAt);
|
|
32106
32178
|
});
|
|
32179
|
+
enrichSessionsWithModelOrigin(sections, issueId);
|
|
32107
32180
|
let costByStage = {};
|
|
32108
32181
|
let totalCost = null;
|
|
32109
32182
|
try {
|
|
@@ -32497,13 +32570,12 @@ Be specific: reference actual file names, function names, requirement text, disc
|
|
|
32497
32570
|
const { command: cliCmd, args: cliArgs } = getAgentCommandSync(statusModelId);
|
|
32498
32571
|
const modelFlag = cliArgs.length > 0 ? ` ${cliArgs.join(" ")}` : "";
|
|
32499
32572
|
const promptFile = join$1(planningDir, ".status-review-prompt.tmp");
|
|
32500
|
-
const { getProviderForModelSync, getProviderEnvSync } = await import("./providers-
|
|
32501
|
-
const { loadConfigSync: loadYamlConfig } = await import("./config-yaml-DR4CnMG4.js");
|
|
32573
|
+
const { getProviderForModelSync, getProviderEnvSync } = await import("./providers-Dre9thog.js");
|
|
32502
32574
|
let providerEnvStr = "";
|
|
32503
32575
|
let providerEnv = {};
|
|
32504
32576
|
const statusProvider = getProviderForModelSync(statusModelId);
|
|
32505
32577
|
if (statusProvider.name !== "anthropic") {
|
|
32506
|
-
const { config } =
|
|
32578
|
+
const { config } = loadConfigSync();
|
|
32507
32579
|
const apiKey = config.apiKeys[statusProvider.name];
|
|
32508
32580
|
if (apiKey) {
|
|
32509
32581
|
providerEnv = getProviderEnvSync(statusProvider, apiKey);
|
|
@@ -32581,7 +32653,7 @@ const postMissionControlUploadRoute = HttpRouter.add("POST", "/api/command-deck/
|
|
|
32581
32653
|
let safeName = filename.replace(/[^a-zA-Z0-9._-]/g, "-");
|
|
32582
32654
|
let processedContent = content;
|
|
32583
32655
|
if (safeName.endsWith(".vtt")) {
|
|
32584
|
-
const { vttToMarkdown } = yield* Effect.promise(() => import("./vtt-parser-
|
|
32656
|
+
const { vttToMarkdown } = yield* Effect.promise(() => import("./vtt-parser-Dik5Bh9h.js"));
|
|
32585
32657
|
processedContent = vttToMarkdown(content);
|
|
32586
32658
|
safeName = safeName.replace(/\.vtt$/, ".md");
|
|
32587
32659
|
}
|
|
@@ -33175,7 +33247,7 @@ async function getTtsDaemonAuthTokenPromise() {
|
|
|
33175
33247
|
return existing;
|
|
33176
33248
|
}
|
|
33177
33249
|
} catch {}
|
|
33178
|
-
const token = randomBytes
|
|
33250
|
+
const token = randomBytes(32).toString("base64url");
|
|
33179
33251
|
await mkdir(dirname$1(QWEN_TTS_AUTH_TOKEN_PATH), {
|
|
33180
33252
|
recursive: true,
|
|
33181
33253
|
mode: 448
|
|
@@ -36798,6 +36870,158 @@ function isAbortError(error) {
|
|
|
36798
36870
|
return error instanceof Error && error.name === "AbortError";
|
|
36799
36871
|
}
|
|
36800
36872
|
//#endregion
|
|
36873
|
+
//#region ../../lib/overdeck/legacy-import.ts
|
|
36874
|
+
init_driver();
|
|
36875
|
+
init_conversations();
|
|
36876
|
+
function previewLegacyConversations(path) {
|
|
36877
|
+
if (!existsSync$1(path)) return { found: false };
|
|
36878
|
+
const db = openDatabase(path, { readOnly: true });
|
|
36879
|
+
try {
|
|
36880
|
+
const legacyRows = db.prepare(`SELECT name, title, created_at, model, last_attached_at, claude_session_id
|
|
36881
|
+
FROM conversations
|
|
36882
|
+
ORDER BY created_at DESC`).all();
|
|
36883
|
+
const favSet = new Set(db.prepare(`SELECT item_id FROM favorites WHERE type = 'conversation'`).all().map((r) => r.item_id));
|
|
36884
|
+
const rows = [];
|
|
36885
|
+
for (const row of legacyRows) {
|
|
36886
|
+
if (isAgentConversationName(row.name)) continue;
|
|
36887
|
+
rows.push({
|
|
36888
|
+
name: row.name,
|
|
36889
|
+
title: row.title,
|
|
36890
|
+
createdAt: row.created_at,
|
|
36891
|
+
model: row.model,
|
|
36892
|
+
lastActivityAt: row.last_attached_at,
|
|
36893
|
+
messageCount: null,
|
|
36894
|
+
hasFavorite: favSet.has(row.name),
|
|
36895
|
+
claudeSessionId: row.claude_session_id,
|
|
36896
|
+
alreadyImported: getConversationByName(row.name) !== null
|
|
36897
|
+
});
|
|
36898
|
+
}
|
|
36899
|
+
return {
|
|
36900
|
+
found: true,
|
|
36901
|
+
rows
|
|
36902
|
+
};
|
|
36903
|
+
} finally {
|
|
36904
|
+
db.close();
|
|
36905
|
+
}
|
|
36906
|
+
}
|
|
36907
|
+
function parseIsoToMs(iso) {
|
|
36908
|
+
if (!iso) return null;
|
|
36909
|
+
const ms = new Date(iso).getTime();
|
|
36910
|
+
return Number.isNaN(ms) ? null : ms;
|
|
36911
|
+
}
|
|
36912
|
+
function importLegacyConversations(path, names) {
|
|
36913
|
+
const result = {
|
|
36914
|
+
imported: [],
|
|
36915
|
+
skipped: [],
|
|
36916
|
+
failed: [],
|
|
36917
|
+
warnings: [],
|
|
36918
|
+
favoritesCarried: 0
|
|
36919
|
+
};
|
|
36920
|
+
if (!existsSync$1(path) || names.length === 0) return result;
|
|
36921
|
+
const db = openDatabase(path, { readOnly: true });
|
|
36922
|
+
let legacyRows;
|
|
36923
|
+
let favSet;
|
|
36924
|
+
try {
|
|
36925
|
+
const placeholders = names.map(() => "?").join(", ");
|
|
36926
|
+
legacyRows = db.prepare(`SELECT id, name, tmux_session, status, cwd, created_at, ended_at, last_attached_at,
|
|
36927
|
+
session_file, claude_session_id, title, title_source, title_seed,
|
|
36928
|
+
total_cost, total_tokens, archived_at, model, effort, fork_status, fork_error,
|
|
36929
|
+
harness, delivery_method, spawn_error, handoff_doc_path, handoff_target_conv_id,
|
|
36930
|
+
fork_fallback_reason, cleared_to_conv_id, fork_request, fork_retry_count
|
|
36931
|
+
FROM conversations WHERE name IN (${placeholders})`).all(...names);
|
|
36932
|
+
favSet = new Set(db.prepare(`SELECT item_id FROM favorites WHERE type = 'conversation'`).all().map((r) => r.item_id));
|
|
36933
|
+
} finally {
|
|
36934
|
+
db.close();
|
|
36935
|
+
}
|
|
36936
|
+
const rowidToUuid = /* @__PURE__ */ new Map();
|
|
36937
|
+
for (const row of legacyRows) {
|
|
36938
|
+
if (isAgentConversationName(row.name)) {
|
|
36939
|
+
result.skipped.push({
|
|
36940
|
+
name: row.name,
|
|
36941
|
+
reason: "agent/planning/specialist conversation excluded from import"
|
|
36942
|
+
});
|
|
36943
|
+
continue;
|
|
36944
|
+
}
|
|
36945
|
+
const createdAtMs = parseIsoToMs(row.created_at);
|
|
36946
|
+
if (createdAtMs === null) {
|
|
36947
|
+
result.failed.push({
|
|
36948
|
+
name: row.name,
|
|
36949
|
+
reason: `unparseable created_at: ${String(row.created_at)}`
|
|
36950
|
+
});
|
|
36951
|
+
continue;
|
|
36952
|
+
}
|
|
36953
|
+
if (getConversationByName(row.name) !== null) {
|
|
36954
|
+
result.skipped.push({
|
|
36955
|
+
name: row.name,
|
|
36956
|
+
reason: "name already exists in overdeck.db"
|
|
36957
|
+
});
|
|
36958
|
+
continue;
|
|
36959
|
+
}
|
|
36960
|
+
if (row.claude_session_id && getConversationByClaudeSessionId(row.claude_session_id) !== null) {
|
|
36961
|
+
result.skipped.push({
|
|
36962
|
+
name: row.name,
|
|
36963
|
+
reason: "claude_session_id already registered in overdeck.db"
|
|
36964
|
+
});
|
|
36965
|
+
continue;
|
|
36966
|
+
}
|
|
36967
|
+
const archivedAtMs = parseIsoToMs(row.archived_at);
|
|
36968
|
+
const status = row.status ?? (archivedAtMs ? "ended" : "active");
|
|
36969
|
+
const { uuid } = importLegacyConversation({
|
|
36970
|
+
name: row.name,
|
|
36971
|
+
tmuxSession: row.tmux_session,
|
|
36972
|
+
status,
|
|
36973
|
+
cwd: row.cwd,
|
|
36974
|
+
createdAt: createdAtMs,
|
|
36975
|
+
endedAt: parseIsoToMs(row.ended_at),
|
|
36976
|
+
lastAttachedAt: parseIsoToMs(row.last_attached_at),
|
|
36977
|
+
sessionFile: row.session_file,
|
|
36978
|
+
claudeSessionId: row.claude_session_id,
|
|
36979
|
+
title: row.title,
|
|
36980
|
+
titleSource: row.title_source,
|
|
36981
|
+
titleSeed: row.title_seed,
|
|
36982
|
+
totalCost: row.total_cost ?? 0,
|
|
36983
|
+
totalTokens: row.total_tokens ?? 0,
|
|
36984
|
+
archivedAt: archivedAtMs,
|
|
36985
|
+
model: row.model,
|
|
36986
|
+
effort: row.effort,
|
|
36987
|
+
forkStatus: row.fork_status,
|
|
36988
|
+
forkError: row.fork_error,
|
|
36989
|
+
harness: row.harness,
|
|
36990
|
+
deliveryMethod: row.delivery_method,
|
|
36991
|
+
spawnError: row.spawn_error,
|
|
36992
|
+
handoffDocPath: row.handoff_doc_path,
|
|
36993
|
+
forkFallbackReason: row.fork_fallback_reason,
|
|
36994
|
+
forkRequest: row.fork_request,
|
|
36995
|
+
forkRetryCount: row.fork_retry_count ?? 0
|
|
36996
|
+
});
|
|
36997
|
+
rowidToUuid.set(row.id, uuid);
|
|
36998
|
+
result.imported.push(row.name);
|
|
36999
|
+
if (favSet.has(row.name)) {
|
|
37000
|
+
setFavorite("conversation", row.name);
|
|
37001
|
+
result.favoritesCarried++;
|
|
37002
|
+
}
|
|
37003
|
+
}
|
|
37004
|
+
for (const row of legacyRows) {
|
|
37005
|
+
const uuid = rowidToUuid.get(row.id);
|
|
37006
|
+
if (!uuid) continue;
|
|
37007
|
+
const handoffTargetUuid = row.handoff_target_conv_id != null ? rowidToUuid.get(row.handoff_target_conv_id) ?? null : null;
|
|
37008
|
+
const clearedToUuid = row.cleared_to_conv_id != null ? rowidToUuid.get(row.cleared_to_conv_id) ?? null : null;
|
|
37009
|
+
if (row.handoff_target_conv_id != null && handoffTargetUuid === null) result.warnings.push({
|
|
37010
|
+
name: row.name,
|
|
37011
|
+
reason: `handoff target (legacy rowid ${row.handoff_target_conv_id}) was not imported; handoff_target_conv_id set to NULL`
|
|
37012
|
+
});
|
|
37013
|
+
if (row.cleared_to_conv_id != null && clearedToUuid === null) result.warnings.push({
|
|
37014
|
+
name: row.name,
|
|
37015
|
+
reason: `cleared_to target (legacy rowid ${row.cleared_to_conv_id}) was not imported; cleared_to_conv_id set to NULL`
|
|
37016
|
+
});
|
|
37017
|
+
if (handoffTargetUuid !== null || clearedToUuid !== null) setImportedConversationLinks(uuid, {
|
|
37018
|
+
handoffTargetUuid,
|
|
37019
|
+
clearedToUuid
|
|
37020
|
+
});
|
|
37021
|
+
}
|
|
37022
|
+
return result;
|
|
37023
|
+
}
|
|
37024
|
+
//#endregion
|
|
36801
37025
|
//#region routes/settings.ts
|
|
36802
37026
|
/**
|
|
36803
37027
|
* Settings route module — Effect HttpRouter.Layer (PAN-428 B15)
|
|
@@ -36815,6 +37039,7 @@ init_providers();
|
|
|
36815
37039
|
init_http_handler();
|
|
36816
37040
|
init_agents$2();
|
|
36817
37041
|
init_config_yaml();
|
|
37042
|
+
init_paths();
|
|
36818
37043
|
const REINDEX_CONFIRM_THRESHOLD_USD = 1;
|
|
36819
37044
|
const REINDEX_CONFIRM_TTL_MS = 600 * 1e3;
|
|
36820
37045
|
const reindexConfirmationNonces = /* @__PURE__ */ new Map();
|
|
@@ -36826,7 +37051,7 @@ let conversationReindexProgress = {
|
|
|
36826
37051
|
chunksIndexed: 0
|
|
36827
37052
|
};
|
|
36828
37053
|
function createReindexConfirmationNonce(estimatedUsd) {
|
|
36829
|
-
const nonce = randomBytes
|
|
37054
|
+
const nonce = randomBytes(24).toString("base64url");
|
|
36830
37055
|
const now = Date.now();
|
|
36831
37056
|
for (const [key, entry] of reindexConfirmationNonces) if (entry.expiresAt <= now) reindexConfirmationNonces.delete(key);
|
|
36832
37057
|
reindexConfirmationNonces.set(nonce, {
|
|
@@ -37616,7 +37841,41 @@ const getProviderEnvConflictsRoute = HttpRouter.add("GET", "/api/settings/provid
|
|
|
37616
37841
|
}
|
|
37617
37842
|
});
|
|
37618
37843
|
})));
|
|
37619
|
-
const
|
|
37844
|
+
const getLegacyImportPreviewRoute = HttpRouter.add("GET", "/api/settings/legacy-import/conversations", httpHandler(Effect.gen(function* () {
|
|
37845
|
+
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
37846
|
+
return yield* Effect.try({
|
|
37847
|
+
try: () => {
|
|
37848
|
+
const urlPath = new URL(request.url, "http://localhost").searchParams.get("path");
|
|
37849
|
+
const defaultPath = join$1(getLegacyHome(), "panopticon.db");
|
|
37850
|
+
const resolvedPath = urlPath?.trim() || defaultPath;
|
|
37851
|
+
const preview = previewLegacyConversations(resolvedPath);
|
|
37852
|
+
if (!preview.found) return jsonResponse({
|
|
37853
|
+
found: false,
|
|
37854
|
+
defaultPath,
|
|
37855
|
+
message: `No legacy database found at ${resolvedPath}`
|
|
37856
|
+
});
|
|
37857
|
+
return jsonResponse({
|
|
37858
|
+
found: true,
|
|
37859
|
+
path: resolvedPath,
|
|
37860
|
+
conversations: preview.rows
|
|
37861
|
+
});
|
|
37862
|
+
},
|
|
37863
|
+
catch: (err) => jsonResponse({ error: err instanceof Error ? err.message : String(err) }, { status: 500 })
|
|
37864
|
+
});
|
|
37865
|
+
})));
|
|
37866
|
+
const postLegacyImportRoute = HttpRouter.add("POST", "/api/settings/legacy-import/conversations", httpHandler(Effect.gen(function* () {
|
|
37867
|
+
const authError = rejectUnsafeDashboardMutationRequest(yield* HttpServerRequest.HttpServerRequest);
|
|
37868
|
+
if (authError) return authError;
|
|
37869
|
+
const body = yield* readJsonBody$8;
|
|
37870
|
+
return yield* Effect.try({
|
|
37871
|
+
try: () => {
|
|
37872
|
+
const { path, names } = body;
|
|
37873
|
+
return jsonResponse(importLegacyConversations(path, names));
|
|
37874
|
+
},
|
|
37875
|
+
catch: (err) => jsonResponse({ error: err instanceof Error ? err.message : String(err) }, { status: 500 })
|
|
37876
|
+
});
|
|
37877
|
+
})));
|
|
37878
|
+
const settingsRouteLayer = Layer.mergeAll(getSettingsRoute, getAvailableModelsRoute, getOptimalDefaultsRoute, getMiniMaxDefaultsRoute, getClaudeAuthRoute, getOpenAIAuthRoute, postTestApiKeyRoute, postValidateApiKeyRoute, getConversationSearchStatusRoute, getConversationSearchReindexEstimateRoute, postConversationSearchReindexRoute, getConversationSearchReindexProgressRoute, putSettingsRoute, putUiThemeRoute, getOpenRouterModelsRoute, putOpenRouterFavoritesRoute, putOpenRouterApiKeyRoute, postOpenRouterTestKeyRoute, getHarnessPolicyRoute, getProviderEnvConflictsRoute, getLegacyImportPreviewRoute, postLegacyImportRoute);
|
|
37620
37879
|
//#endregion
|
|
37621
37880
|
//#region routes/autopreso.ts
|
|
37622
37881
|
init_http_helpers();
|
|
@@ -38342,7 +38601,7 @@ const postRallyValidateRoute = HttpRouter.add("POST", "/api/rally/validate", Eff
|
|
|
38342
38601
|
}, { status: 400 });
|
|
38343
38602
|
return yield* Effect.promise(async () => {
|
|
38344
38603
|
try {
|
|
38345
|
-
const { RallyRestApi } = await import("./rally-api-
|
|
38604
|
+
const { RallyRestApi } = await import("./rally-api-CKayMhOp.js");
|
|
38346
38605
|
const api = new RallyRestApi({
|
|
38347
38606
|
apiKey,
|
|
38348
38607
|
server: server || "https://rally1.rallydev.com"
|
|
@@ -38469,7 +38728,7 @@ const getVersionRoute = HttpRouter.add("GET", "/api/version", Effect.promise(asy
|
|
|
38469
38728
|
const version = await getOverdeckVersion();
|
|
38470
38729
|
let supervisorUrl = null;
|
|
38471
38730
|
try {
|
|
38472
|
-
const { getSupervisorUrlSync } = await import("./supervisor-
|
|
38731
|
+
const { getSupervisorUrlSync } = await import("./supervisor-DVlsIgfZ.js");
|
|
38473
38732
|
supervisorUrl = getSupervisorUrlSync();
|
|
38474
38733
|
} catch {}
|
|
38475
38734
|
return jsonResponse({
|
|
@@ -38565,7 +38824,7 @@ const getPlanningStatusRoute = HttpRouter.add("GET", "/api/planning/:issueId/sta
|
|
|
38565
38824
|
const remoteState = loadRemoteAgentState(sessionName);
|
|
38566
38825
|
const isRemote = !!remoteState;
|
|
38567
38826
|
const vmName = remoteState?.vmName ?? "";
|
|
38568
|
-
const { getAgentStateSync } = await import("./agents-
|
|
38827
|
+
const { getAgentStateSync } = await import("./agents-BeWOeR_m.js");
|
|
38569
38828
|
const agentStarting = getAgentStateSync(sessionName)?.status === "starting";
|
|
38570
38829
|
let tmuxSessionAlive = false;
|
|
38571
38830
|
if (!isRemote) try {
|
|
@@ -38708,10 +38967,9 @@ Continue the PLANNING session. Do NOT implement anything.
|
|
|
38708
38967
|
`);
|
|
38709
38968
|
const agentCwd = workspacePath;
|
|
38710
38969
|
if (existsSync$1(outputFile)) await rename(outputFile, join$1(planningDir, `output-${Date.now()}.jsonl`));
|
|
38711
|
-
const { getAgentCommandSync } = await import("./settings-
|
|
38970
|
+
const { getAgentCommandSync } = await import("./settings-wPqxbDcV.js");
|
|
38712
38971
|
let msgPlanningModel = "claude-sonnet-4-6";
|
|
38713
38972
|
try {
|
|
38714
|
-
const { loadConfigSync, resolveModel } = await import("./config-yaml-DR4CnMG4.js");
|
|
38715
38973
|
msgPlanningModel = resolveModel("plan", void 0, loadConfigSync().config);
|
|
38716
38974
|
} catch {}
|
|
38717
38975
|
const msgAgentCmd = getAgentCommandSync(msgPlanningModel);
|
|
@@ -38771,7 +39029,7 @@ const deletePlanningSessionRoute = HttpRouter.add("DELETE", "/api/planning/:issu
|
|
|
38771
39029
|
}));
|
|
38772
39030
|
const getTldrStatusRoute = HttpRouter.add("GET", "/api/services/tldr/status", Effect.promise(async () => {
|
|
38773
39031
|
try {
|
|
38774
|
-
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-
|
|
39032
|
+
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-CdfMe3Oe.js");
|
|
38775
39033
|
const projectRoot = process.cwd();
|
|
38776
39034
|
const venvPath = join$1(projectRoot, ".venv");
|
|
38777
39035
|
const results = [];
|
|
@@ -38816,7 +39074,7 @@ const getTldrStatusRoute = HttpRouter.add("GET", "/api/services/tldr/status", Ef
|
|
|
38816
39074
|
}));
|
|
38817
39075
|
const postTldrStartRoute = HttpRouter.add("POST", "/api/services/tldr/start", Effect.promise(async () => {
|
|
38818
39076
|
try {
|
|
38819
|
-
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-
|
|
39077
|
+
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-CdfMe3Oe.js");
|
|
38820
39078
|
const projectRoot = process.cwd();
|
|
38821
39079
|
const venvPath = join$1(projectRoot, ".venv");
|
|
38822
39080
|
if (!existsSync$1(venvPath)) return jsonResponse({ error: "No .venv found in project root" }, { status: 404 });
|
|
@@ -38833,7 +39091,7 @@ const postTldrStartRoute = HttpRouter.add("POST", "/api/services/tldr/start", Ef
|
|
|
38833
39091
|
}));
|
|
38834
39092
|
const postTldrStopRoute = HttpRouter.add("POST", "/api/services/tldr/stop", Effect.promise(async () => {
|
|
38835
39093
|
try {
|
|
38836
|
-
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-
|
|
39094
|
+
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-CdfMe3Oe.js");
|
|
38837
39095
|
const projectRoot = process.cwd();
|
|
38838
39096
|
const venvPath = join$1(projectRoot, ".venv");
|
|
38839
39097
|
if (!existsSync$1(venvPath)) return jsonResponse({ error: "No .venv found in project root" }, { status: 404 });
|
|
@@ -38850,7 +39108,7 @@ const postTldrStopRoute = HttpRouter.add("POST", "/api/services/tldr/stop", Effe
|
|
|
38850
39108
|
}));
|
|
38851
39109
|
const postTldrReloadRoute = HttpRouter.add("POST", "/api/services/tldr/reload", Effect.promise(async () => {
|
|
38852
39110
|
try {
|
|
38853
|
-
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-
|
|
39111
|
+
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-CdfMe3Oe.js");
|
|
38854
39112
|
const enabled = isTldrEnabledSync();
|
|
38855
39113
|
const projectRoot = process.cwd();
|
|
38856
39114
|
const targets = [];
|
|
@@ -38975,7 +39233,7 @@ const postShadowMonitorRoute = HttpRouter.add("POST", "/api/shadow/:issueId/moni
|
|
|
38975
39233
|
const projectPath = await getProjectPath(issuePrefix);
|
|
38976
39234
|
const workspacePath = join$1(projectPath, "workspaces", `feature-${issueLower}`);
|
|
38977
39235
|
if (!existsSync$1(workspacePath)) return jsonResponse({ error: "Workspace not found" }, { status: 404 });
|
|
38978
|
-
const { gatherArtifacts, generateBasicInference, updateInferenceDocumentSync } = await import("./shadow-engineering-
|
|
39236
|
+
const { gatherArtifacts, generateBasicInference, updateInferenceDocumentSync } = await import("./shadow-engineering-BZTBik_h.js");
|
|
38979
39237
|
const config = {
|
|
38980
39238
|
issueId,
|
|
38981
39239
|
workspacePath,
|
|
@@ -39005,7 +39263,7 @@ const postShadowObserveRoute = HttpRouter.add("POST", "/api/shadow/:issueId/obse
|
|
|
39005
39263
|
if (!existsSync$1(workspacePath)) return jsonResponse({ error: "Workspace not found" }, { status: 404 });
|
|
39006
39264
|
const ghConfig = getGitHubConfig();
|
|
39007
39265
|
if (!ghConfig) return jsonResponse({ error: "GitHub not configured - Observer requires GitHub" }, { status: 400 });
|
|
39008
|
-
const { runObserverCycle } = await import("./shadow-engineering-
|
|
39266
|
+
const { runObserverCycle } = await import("./shadow-engineering-BZTBik_h.js");
|
|
39009
39267
|
const firstRepo = ghConfig.repos[0];
|
|
39010
39268
|
const config = {
|
|
39011
39269
|
issueId,
|
|
@@ -40345,7 +40603,7 @@ async function cleanupConversationAttachments(name) {
|
|
|
40345
40603
|
* sessions that the lifecycle poller missed. */
|
|
40346
40604
|
async function cleanupOrphanedConversationAttachments() {
|
|
40347
40605
|
try {
|
|
40348
|
-
const { listConversations } = await import("./conversations-
|
|
40606
|
+
const { listConversations } = await import("./conversations-DumOm1wb.js");
|
|
40349
40607
|
const convNames = new Set(listConversations().map((c) => c.name));
|
|
40350
40608
|
const root = getConversationAttachmentsRoot();
|
|
40351
40609
|
await runInBatches((await readdir(root, { withFileTypes: true })).filter((entry) => entry.isDirectory() && !convNames.has(entry.name)).map((entry) => join$1(root, entry.name)), 10, (path) => rm(path, {
|
|
@@ -40892,7 +41150,7 @@ async function waitForPiTuiReady(tmuxSession, timeoutMs = 3e4) {
|
|
|
40892
41150
|
return false;
|
|
40893
41151
|
}
|
|
40894
41152
|
async function resolveSessionFile(conv) {
|
|
40895
|
-
if (conv.harness === "ohmypi") {
|
|
41153
|
+
if (conv.harness === "ohmypi" || conv.harness === "pi") {
|
|
40896
41154
|
const piPath = await resolvePiSessionPath(conv.tmuxSession);
|
|
40897
41155
|
if (piPath) return piPath;
|
|
40898
41156
|
}
|
|
@@ -41049,6 +41307,7 @@ async function handleConversationImageUpload(name, filename, bytes, mimeType) {
|
|
|
41049
41307
|
async function handleConversationMessage(name, body) {
|
|
41050
41308
|
const conv = getConversationByName(name);
|
|
41051
41309
|
if (!conv) return jsonResponse({ error: "Conversation not found" }, { status: 404 });
|
|
41310
|
+
if (conv.status === "ended") return jsonResponse({ error: "Session has ended — start a new run to interact" }, { status: 422 });
|
|
41052
41311
|
const message = typeof body["message"] === "string" ? body["message"].trim() : "";
|
|
41053
41312
|
if (!message) return jsonResponse({ error: "Message is required" }, { status: 400 });
|
|
41054
41313
|
if (message.length > MAX_MESSAGE_LENGTH) return jsonResponse({ error: `Message exceeds maximum length of ${MAX_MESSAGE_LENGTH} characters` }, { status: 400 });
|
|
@@ -41396,7 +41655,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
|
|
|
41396
41655
|
const codexApprovalPolicy = codexPermMode === "full-access" ? "never" : "on-request";
|
|
41397
41656
|
const codexSandboxMode = codexPermMode === "full-access" ? "danger-full-access" : codexPermMode === "read-only" ? "read-only" : "workspace-write";
|
|
41398
41657
|
const codexApprovalsReviewer = codexPermMode === "auto-review" ? "auto_review" : void 0;
|
|
41399
|
-
const { initCodexHome, extractThreadIdFromRollout } = await import("./codex-
|
|
41658
|
+
const { initCodexHome, extractThreadIdFromRollout } = await import("./codex-DZZiDgis.js");
|
|
41400
41659
|
initCodexHome(codexHome, {
|
|
41401
41660
|
trustedDir: cwd,
|
|
41402
41661
|
approvalPolicy: codexApprovalPolicy,
|
|
@@ -41466,7 +41725,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
|
|
|
41466
41725
|
} catch {}
|
|
41467
41726
|
console.log(`[claude-invoke] purpose=conversation-session | model=${model || "default"} | source=conversations.ts:spawnConversationSession | session=${tmuxSession} | resume=${resume} | command="${runtimeCommand}"`);
|
|
41468
41727
|
try {
|
|
41469
|
-
const { preTrustDirectory } = await import("./workspace-manager-
|
|
41728
|
+
const { preTrustDirectory } = await import("./workspace-manager-B7Ji7R9Y.js");
|
|
41470
41729
|
preTrustDirectory(cwd);
|
|
41471
41730
|
} catch {}
|
|
41472
41731
|
try {
|
|
@@ -41483,7 +41742,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
|
|
|
41483
41742
|
const codexHomeDir = codexFields.codexHome;
|
|
41484
41743
|
(async () => {
|
|
41485
41744
|
try {
|
|
41486
|
-
const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-
|
|
41745
|
+
const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-DZZiDgis.js");
|
|
41487
41746
|
const rollout = await waitForCodexRollout(codexHomeDir, 12e4);
|
|
41488
41747
|
if (rollout) {
|
|
41489
41748
|
const threadId = extractThreadIdFromRollout(rollout);
|
|
@@ -43665,7 +43924,7 @@ async function registerProjectFromPath(opts) {
|
|
|
43665
43924
|
registerProjectSync(key, projectConfig);
|
|
43666
43925
|
const seededContextLayer = ensureProjectLayer(fullPath);
|
|
43667
43926
|
try {
|
|
43668
|
-
const { preTrustDirectorySync } = await import("./workspace-manager-
|
|
43927
|
+
const { preTrustDirectorySync } = await import("./workspace-manager-B7Ji7R9Y.js");
|
|
43669
43928
|
preTrustDirectorySync(fullPath);
|
|
43670
43929
|
} catch {}
|
|
43671
43930
|
let hooksInstalled = 0;
|
|
@@ -43706,7 +43965,7 @@ init_jsonl_resolver();
|
|
|
43706
43965
|
init_paths();
|
|
43707
43966
|
const execAsync$2 = promisify(exec);
|
|
43708
43967
|
async function getIssueDataService() {
|
|
43709
|
-
const { getSharedIssueService } = await import("./issue-service-singleton-
|
|
43968
|
+
const { getSharedIssueService } = await import("./issue-service-singleton-BoOA6Zoi.js");
|
|
43710
43969
|
return getSharedIssueService();
|
|
43711
43970
|
}
|
|
43712
43971
|
/** Returns true if the path exists (any type). */
|
|
@@ -43956,6 +44215,7 @@ async function collectSessionTreeNodes(issueId, workspacePath, projectPath, cont
|
|
|
43956
44215
|
});
|
|
43957
44216
|
}
|
|
43958
44217
|
}
|
|
44218
|
+
enrichSessionsWithModelOrigin(sections, issueId);
|
|
43959
44219
|
return sections.filter((s) => !isStaleLegacySession(s));
|
|
43960
44220
|
}
|
|
43961
44221
|
async function resolveFeatureTitle(issueId, issueLower, issueTitles, project) {
|
|
@@ -45722,8 +45982,8 @@ async function handlePullRequestPromise(payload) {
|
|
|
45722
45982
|
if (!issueId) return;
|
|
45723
45983
|
const repo = payload.repository.full_name;
|
|
45724
45984
|
if (payload.action === "closed" && pr.merged === true) try {
|
|
45725
|
-
const { postMergeLifecycle } = await import("./merge-agent-
|
|
45726
|
-
const { resolveProjectFromIssueSync } = await import("./projects-
|
|
45985
|
+
const { postMergeLifecycle } = await import("./merge-agent-PlMChx1A.js");
|
|
45986
|
+
const { resolveProjectFromIssueSync } = await import("./projects-Bx1iT8WM.js");
|
|
45727
45987
|
const project = resolveProjectFromIssueSync(issueId);
|
|
45728
45988
|
if (project) {
|
|
45729
45989
|
const branchName = pr.head.ref;
|
|
@@ -46184,7 +46444,7 @@ function getCheckpointWorker() {
|
|
|
46184
46444
|
return worker;
|
|
46185
46445
|
}
|
|
46186
46446
|
async function runInline(operation, payload) {
|
|
46187
|
-
const { claimTranscriptRange, commitTranscriptRange, releaseTranscriptRange, getTranscriptCheckpoint, listTranscriptCheckpoints } = await import("./checkpoints-
|
|
46447
|
+
const { claimTranscriptRange, commitTranscriptRange, releaseTranscriptRange, getTranscriptCheckpoint, listTranscriptCheckpoints } = await import("./checkpoints-AfvX58uE.js");
|
|
46188
46448
|
switch (operation) {
|
|
46189
46449
|
case "claimTranscriptRange": return claimTranscriptRange(payload);
|
|
46190
46450
|
case "commitTranscriptRange": return commitTranscriptRange(payload);
|
|
@@ -47338,7 +47598,7 @@ function buildPendingTurn(input, fromOffset, toOffset, compressed) {
|
|
|
47338
47598
|
};
|
|
47339
47599
|
}
|
|
47340
47600
|
async function emitMemoryObservationCreated(observation, timestamp) {
|
|
47341
|
-
const { initEventStore } = await import("./event-store-
|
|
47601
|
+
const { initEventStore } = await import("./event-store-wcLlc5KG.js");
|
|
47342
47602
|
await (await initEventStore()).appendAsync({
|
|
47343
47603
|
type: "memory.observation_created",
|
|
47344
47604
|
timestamp,
|
|
@@ -50266,7 +50526,7 @@ async function getFlywheelConversationPayload() {
|
|
|
50266
50526
|
};
|
|
50267
50527
|
}
|
|
50268
50528
|
async function postFlywheelReportPayload() {
|
|
50269
|
-
const { flywheelReportCommand } = await import("./flywheel-
|
|
50529
|
+
const { flywheelReportCommand } = await import("./flywheel-Bz8p0duH.js");
|
|
50270
50530
|
await flywheelReportCommand({ cwd: process.cwd() });
|
|
50271
50531
|
return {
|
|
50272
50532
|
status: 200,
|
|
@@ -50455,11 +50715,11 @@ const getMergeBlockersRoute = HttpRouter.add("GET", "/api/flywheel/merge-blocker
|
|
|
50455
50715
|
async function defaultGetOrderedIssueIds() {
|
|
50456
50716
|
const status = await readCurrentFlywheelStatusForDashboard();
|
|
50457
50717
|
if (!status) return [];
|
|
50458
|
-
const { computeMergeQueue } = await import("./flywheel-merge-order-
|
|
50718
|
+
const { computeMergeQueue } = await import("./flywheel-merge-order-B027U7Y2.js");
|
|
50459
50719
|
return (await Effect.runPromise(computeMergeQueue(status.activePipeline, process.cwd()).pipe(Effect.provide(layer)))).map((i) => i.issueId);
|
|
50460
50720
|
}
|
|
50461
50721
|
async function defaultMergeOne(issueId) {
|
|
50462
|
-
const { triggerMerge } = await import("./workspaces-
|
|
50722
|
+
const { triggerMerge } = await import("./workspaces-BB169tZ1.js");
|
|
50463
50723
|
const r = await triggerMerge(issueId);
|
|
50464
50724
|
return r.success ? { ok: true } : {
|
|
50465
50725
|
ok: false,
|
|
@@ -50479,7 +50739,7 @@ async function postFlywheelMergeNextPayload(payload, deps = {}) {
|
|
|
50479
50739
|
body: { error: "n must be a positive integer" }
|
|
50480
50740
|
};
|
|
50481
50741
|
const issueIds = (await (deps.getOrderedIssueIds ?? defaultGetOrderedIssueIds)()).slice(0, n);
|
|
50482
|
-
const { shipMergeBatch } = await import("./merge-batch-
|
|
50742
|
+
const { shipMergeBatch } = await import("./merge-batch-CaSP7OL6.js");
|
|
50483
50743
|
return {
|
|
50484
50744
|
status: 200,
|
|
50485
50745
|
body: { outcomes: await shipMergeBatch(issueIds, { merge: deps.merge ?? defaultMergeOne }) }
|
|
@@ -50636,7 +50896,7 @@ const getFlywheelMergeQueueRoute = HttpRouter.add("GET", "/api/flywheel/merge-qu
|
|
|
50636
50896
|
return yield* Effect.promise(async () => {
|
|
50637
50897
|
const status = await readCurrentFlywheelStatusForDashboard();
|
|
50638
50898
|
if (!status) return jsonResponse([]);
|
|
50639
|
-
const { computeMergeQueue, resolveMergeQueuePrUrl } = await import("./flywheel-merge-order-
|
|
50899
|
+
const { computeMergeQueue, resolveMergeQueuePrUrl } = await import("./flywheel-merge-order-B027U7Y2.js");
|
|
50640
50900
|
return jsonResponse(await Effect.runPromise(computeMergeQueue(status.activePipeline, process.cwd(), { getPrUrl: resolveMergeQueuePrUrl }).pipe(Effect.provide(layer))));
|
|
50641
50901
|
});
|
|
50642
50902
|
})));
|
|
@@ -50650,14 +50910,14 @@ function uatGenerationNameFromParam(param) {
|
|
|
50650
50910
|
return decoded.startsWith("uat/") ? decoded : `uat/${decoded}`;
|
|
50651
50911
|
}
|
|
50652
50912
|
const getUatGenerationsRoute = HttpRouter.add("GET", "/api/flywheel/uat-generations", httpHandler(Effect.gen(function* () {
|
|
50653
|
-
const { getUatGenerationsPayload } = yield* Effect.promise(() => import("./uat-train-
|
|
50913
|
+
const { getUatGenerationsPayload } = yield* Effect.promise(() => import("./uat-train-D0UsTS5S.js"));
|
|
50654
50914
|
return jsonResponse(yield* Effect.promise(() => getUatGenerationsPayload()));
|
|
50655
50915
|
})));
|
|
50656
50916
|
const postUatGenerationStackRoute = HttpRouter.add("POST", "/api/flywheel/uat-generations/:name/stack", httpHandler(Effect.gen(function* () {
|
|
50657
50917
|
const authError = rejectUnsafeDashboardMutationRequest(yield* HttpServerRequest.HttpServerRequest);
|
|
50658
50918
|
if (authError) return authError;
|
|
50659
50919
|
const name = uatGenerationNameFromParam((yield* HttpRouter.params)["name"] ?? "");
|
|
50660
|
-
const { postUatGenerationStackPayload } = yield* Effect.promise(() => import("./uat-train-
|
|
50920
|
+
const { postUatGenerationStackPayload } = yield* Effect.promise(() => import("./uat-train-D0UsTS5S.js"));
|
|
50661
50921
|
const result = yield* Effect.promise(() => postUatGenerationStackPayload(name));
|
|
50662
50922
|
if (!result.ok) return jsonResponse({ error: result.error }, { status: result.status });
|
|
50663
50923
|
return jsonResponse({
|
|
@@ -50669,8 +50929,8 @@ const postUatGenerationPromoteRoute = HttpRouter.add("POST", "/api/flywheel/uat-
|
|
|
50669
50929
|
const authError = rejectUnsafeDashboardMutationRequest(yield* HttpServerRequest.HttpServerRequest);
|
|
50670
50930
|
if (authError) return authError;
|
|
50671
50931
|
const name = uatGenerationNameFromParam((yield* HttpRouter.params)["name"] ?? "");
|
|
50672
|
-
const { postUatGenerationPromotePayload } = yield* Effect.promise(() => import("./uat-train-
|
|
50673
|
-
const { firePostMergeLifecycle } = yield* Effect.promise(() => import("./specialists-
|
|
50932
|
+
const { postUatGenerationPromotePayload } = yield* Effect.promise(() => import("./uat-train-D0UsTS5S.js"));
|
|
50933
|
+
const { firePostMergeLifecycle } = yield* Effect.promise(() => import("./specialists-ZtyvSxW9.js"));
|
|
50674
50934
|
const result = yield* Effect.promise(() => postUatGenerationPromotePayload(name, firePostMergeLifecycle));
|
|
50675
50935
|
if (!result.success) return jsonResponse(result, { status: result.reason === "not-found" ? 404 : result.reason === "merge-failed" ? 500 : 409 });
|
|
50676
50936
|
return jsonResponse(result);
|
|
@@ -50683,7 +50943,7 @@ const postUatGenerationPromoteRoute = HttpRouter.add("POST", "/api/flywheel/uat-
|
|
|
50683
50943
|
const postFlywheelAssembleUatRoute = HttpRouter.add("POST", "/api/flywheel/assemble-uat", httpHandler(Effect.gen(function* () {
|
|
50684
50944
|
const authError = rejectUnsafeDashboardMutationRequest(yield* HttpServerRequest.HttpServerRequest);
|
|
50685
50945
|
if (authError) return authError;
|
|
50686
|
-
const { runUatTrainReconcile } = yield* Effect.promise(() => import("./uat-train-
|
|
50946
|
+
const { runUatTrainReconcile } = yield* Effect.promise(() => import("./uat-train-D0UsTS5S.js"));
|
|
50687
50947
|
return jsonResponse(yield* Effect.promise(() => runUatTrainReconcile({ force: true })));
|
|
50688
50948
|
})));
|
|
50689
50949
|
const getFlywheelStateRoute = HttpRouter.add("GET", "/api/flywheel/state", httpHandler(Effect.gen(function* () {
|
|
@@ -51131,6 +51391,10 @@ const applyIssueBlocksMainLabel = (id) => addIssueLabel(id, BLOCKS_MAIN_LABEL);
|
|
|
51131
51391
|
const removeIssueBlocksMainLabel = (id) => removeIssueLabel(id, BLOCKS_MAIN_LABEL);
|
|
51132
51392
|
const applyIssueReadyLabel = (id) => addIssueLabel(id, READY_LABEL);
|
|
51133
51393
|
const removeIssueReadyLabel = (id) => removeIssueLabel(id, READY_LABEL);
|
|
51394
|
+
const applyIssueReleasedLabel = (id) => addIssueLabel(id, RELEASED_LABEL);
|
|
51395
|
+
const removeIssueReleasedLabel = (id) => removeIssueLabel(id, RELEASED_LABEL);
|
|
51396
|
+
const applyIssueObjectionLabel = (id) => addIssueLabel(id, OBJECTION_LABEL);
|
|
51397
|
+
const removeIssueObjectionLabel = (id) => removeIssueLabel(id, OBJECTION_LABEL);
|
|
51134
51398
|
//#endregion
|
|
51135
51399
|
//#region ../../lib/database/agent-mappers.ts
|
|
51136
51400
|
init_lookups();
|
|
@@ -51308,6 +51572,7 @@ function buildNamedParams(row) {
|
|
|
51308
51572
|
function backfillAgentsFromStateJsonSync(db, options) {
|
|
51309
51573
|
const agentsDir = join$1(getOverdeckHome(), "agents");
|
|
51310
51574
|
const liveSessions = options?.listLiveSessions?.() ?? listLiveTmuxSessionNames();
|
|
51575
|
+
const readHarnessModel = options?.readHarnessModel ?? readAgentHarnessModelRecordSync;
|
|
51311
51576
|
let processed = 0;
|
|
51312
51577
|
let skipped = 0;
|
|
51313
51578
|
let markedStopped = 0;
|
|
@@ -51348,7 +51613,16 @@ function backfillAgentsFromStateJsonSync(db, options) {
|
|
|
51348
51613
|
}
|
|
51349
51614
|
const reconciled = reconcileAgentStatus(state, liveSessions);
|
|
51350
51615
|
if (reconciled.status === "stopped" && state.status !== "stopped") markedStopped++;
|
|
51351
|
-
|
|
51616
|
+
let effective = reconciled;
|
|
51617
|
+
if (reconciled.issueId) {
|
|
51618
|
+
const rec = readHarnessModel(reconciled.issueId);
|
|
51619
|
+
if (rec?.harness || rec?.model) {
|
|
51620
|
+
effective = { ...reconciled };
|
|
51621
|
+
if (rec.harness) effective.harness = rec.harness;
|
|
51622
|
+
if (rec.model) effective.model = rec.model;
|
|
51623
|
+
}
|
|
51624
|
+
}
|
|
51625
|
+
const row = agentStateToDbAgent(effective);
|
|
51352
51626
|
upsert.run(buildNamedParams(row));
|
|
51353
51627
|
processed++;
|
|
51354
51628
|
if (options?.verbose) console.log(`[backfill] ${row.id} -> ${row.status}`);
|
|
@@ -53229,6 +53503,8 @@ const postBacklogLabelsRoute = HttpRouter.add("POST", "/api/backlog/sequence/lab
|
|
|
53229
53503
|
if (typeof body["ready"] === "boolean") await (body["ready"] ? applyIssueReadyLabel : removeIssueReadyLabel)(issueId);
|
|
53230
53504
|
if (typeof body["parked"] === "boolean") await (body["parked"] ? applyIssueParkedLabel : removeIssueParkedLabel)(issueId);
|
|
53231
53505
|
if (typeof body["blocksMain"] === "boolean") await (body["blocksMain"] ? applyIssueBlocksMainLabel : removeIssueBlocksMainLabel)(issueId);
|
|
53506
|
+
if (typeof body["released"] === "boolean") await (body["released"] ? applyIssueReleasedLabel : removeIssueReleasedLabel)(issueId);
|
|
53507
|
+
if (typeof body["objection"] === "boolean") await (body["objection"] ? applyIssueObjectionLabel : removeIssueObjectionLabel)(issueId);
|
|
53232
53508
|
return jsonResponse({
|
|
53233
53509
|
status: "ok",
|
|
53234
53510
|
issueId
|
|
@@ -53838,7 +54114,7 @@ async function pollOnce(state) {
|
|
|
53838
54114
|
try {
|
|
53839
54115
|
const remoteState = await readFile(join$1(homedir$1(), ".overdeck", "agents", agentId, "remote-state.json"), "utf-8").then((text) => JSON.parse(text)).catch(() => null);
|
|
53840
54116
|
if (remoteState?.location === "remote" && remoteState?.vmName) {
|
|
53841
|
-
const { getRemoteAgentOutput } = await import("./remote-agents-
|
|
54117
|
+
const { getRemoteAgentOutput } = await import("./remote-agents-CYhsjnkE.js");
|
|
53842
54118
|
stdout = await getRemoteAgentOutput(agentId, remoteState.vmName, 50);
|
|
53843
54119
|
} else stdout = await Effect.runPromise(capturePane(agentId, 50));
|
|
53844
54120
|
} catch {
|
|
@@ -54504,7 +54780,7 @@ function createSubstrateBugPoller(options = {}) {
|
|
|
54504
54780
|
}
|
|
54505
54781
|
async function scanIssueCandidates(config, store) {
|
|
54506
54782
|
const since = isoLookback(now(), lookbackMs);
|
|
54507
|
-
for (const repo of config.repos) {
|
|
54783
|
+
for (const repo of config.repos) try {
|
|
54508
54784
|
const repoQualifier = `repo:${repo.owner}/${repo.repo}`;
|
|
54509
54785
|
const authorResults = await fetchSearch(config.token, searchQuery([
|
|
54510
54786
|
repoQualifier,
|
|
@@ -54541,11 +54817,13 @@ function createSubstrateBugPoller(options = {}) {
|
|
|
54541
54817
|
});
|
|
54542
54818
|
if (!existing) await appendSubstrateBugFiledEvent(store, bug);
|
|
54543
54819
|
}
|
|
54820
|
+
} catch (err) {
|
|
54821
|
+
log.warn(`[substrate-bug-poller] skipping ${repo.owner}/${repo.repo}:`, err instanceof Error ? err.message : err);
|
|
54544
54822
|
}
|
|
54545
54823
|
}
|
|
54546
54824
|
async function scanMergedPullRequests(config) {
|
|
54547
54825
|
const since = isoLookback(now(), lookbackMs);
|
|
54548
|
-
for (const repo of config.repos) {
|
|
54826
|
+
for (const repo of config.repos) try {
|
|
54549
54827
|
const repoQualifier = `repo:${repo.owner}/${repo.repo}`;
|
|
54550
54828
|
const pullResults = await fetchSearch(config.token, searchQuery([
|
|
54551
54829
|
repoQualifier,
|
|
@@ -54573,6 +54851,8 @@ function createSubstrateBugPoller(options = {}) {
|
|
|
54573
54851
|
repository.markFixed(issueId, commitSha, fixedAt);
|
|
54574
54852
|
}
|
|
54575
54853
|
}
|
|
54854
|
+
} catch (err) {
|
|
54855
|
+
log.warn(`[substrate-bug-poller] skipping ${repo.owner}/${repo.repo}:`, err instanceof Error ? err.message : err);
|
|
54576
54856
|
}
|
|
54577
54857
|
}
|
|
54578
54858
|
async function pollOnce() {
|
|
@@ -54787,7 +55067,7 @@ const RESTART_MARKER = join(homedir(), ".overdeck", "dashboard-restarting.json")
|
|
|
54787
55067
|
* loads new content-hashed chunk filenames (no ERR_MODULE_NOT_FOUND after rebuild).
|
|
54788
55068
|
*/
|
|
54789
55069
|
async function defaultLifecycleRunner(pending) {
|
|
54790
|
-
const { postMergeLifecycle, notifyTldrDaemon } = await import("./merge-agent-
|
|
55070
|
+
const { postMergeLifecycle, notifyTldrDaemon } = await import("./merge-agent-PlMChx1A.js");
|
|
54791
55071
|
await postMergeLifecycle(pending.issueId, pending.projectPath, pending.sourceBranch, { skipDeploy: true });
|
|
54792
55072
|
if (pending.sourceBranch) await notifyTldrDaemon(pending.projectPath, pending.sourceBranch);
|
|
54793
55073
|
}
|
|
@@ -55108,7 +55388,7 @@ function failureReason(result) {
|
|
|
55108
55388
|
return result.error ?? result.message ?? `merge returned status ${result.statusCode ?? "unknown"}`;
|
|
55109
55389
|
}
|
|
55110
55390
|
async function defaultMergeIssue(issueId) {
|
|
55111
|
-
const { triggerMerge } = await import("./workspaces-
|
|
55391
|
+
const { triggerMerge } = await import("./workspaces-BB169tZ1.js");
|
|
55112
55392
|
return triggerMerge(issueId);
|
|
55113
55393
|
}
|
|
55114
55394
|
function defaultAnnounceFailure(issueId, reason) {
|
|
@@ -55719,7 +55999,7 @@ reconcileStaleGitHubBlockers().then((n) => {
|
|
|
55719
55999
|
}
|
|
55720
56000
|
}).catch((err) => console.warn(`[overdeck] Startup blocker reconciliation failed: ${err.message}`));
|
|
55721
56001
|
try {
|
|
55722
|
-
const { resetProcessingToQueued } = await import("./merge-sync-
|
|
56002
|
+
const { resetProcessingToQueued } = await import("./merge-sync-Qvqrosks.js");
|
|
55723
56003
|
const resetCount = resetProcessingToQueued();
|
|
55724
56004
|
if (resetCount > 0) {
|
|
55725
56005
|
console.log(`[overdeck] Reset ${resetCount} stuck merge queue entries to queued`);
|
|
@@ -55748,6 +56028,7 @@ if (process.env.OVERDECK_DISABLE_DEACON === "1") {
|
|
|
55748
56028
|
message: "Cloister auto-start skipped via OVERDECK_DISABLE_DEACON — deacon is not running"
|
|
55749
56029
|
});
|
|
55750
56030
|
} else if (shouldAutoStart()) {
|
|
56031
|
+
resetPatrolHeartbeatForStartup();
|
|
55751
56032
|
getCloisterService().start().catch((err) => {
|
|
55752
56033
|
console.error("[overdeck] Cloister auto-start failed:", err);
|
|
55753
56034
|
emitActivityEntrySync({
|