diff --git a/packages/DerrickBackend/Sources/DerrickBackend/PluginMessagingIngressAdapter.swift b/packages/DerrickBackend/Sources/DerrickBackend/PluginMessagingIngressAdapter.swift index e1e27d9f..fa9ea06c 100644 --- a/packages/DerrickBackend/Sources/DerrickBackend/PluginMessagingIngressAdapter.swift +++ b/packages/DerrickBackend/Sources/DerrickBackend/PluginMessagingIngressAdapter.swift @@ -205,7 +205,7 @@ public final class PluginMessagingIngressAdapter: MessagingIngressAdapter, @unch } } - /// Channel history does not include nested replies. Slack also excludes the + /// Channel history does not include nested replies. Some vendors also exclude the /// `oldest` cursor message unless `inclusive` is set, so stored `reply_count` /// can stay stale after the first reply. Re-poll threaded parents, newest first. private func replyParentsNeedingSync( diff --git a/packages/Structure/Sources/AppLayerServices/AppServices/MessagingDTOs.swift b/packages/Structure/Sources/AppLayerServices/AppServices/MessagingDTOs.swift index 6811b54a..eb6ff371 100644 --- a/packages/Structure/Sources/AppLayerServices/AppServices/MessagingDTOs.swift +++ b/packages/Structure/Sources/AppLayerServices/AppServices/MessagingDTOs.swift @@ -70,11 +70,11 @@ public enum MessagingMessageDirection: String, Codable, Sendable, Hashable { case outbound } -/// Which messages to load for a conversation tab vs a nested Slack-style reply thread. +/// Which messages to load for a conversation tab vs a nested reply thread. public enum MessagingMessageListFilter: Sendable, Hashable { /// Channel/DM feed: messages that are not replies. case channelRoots - /// Root vendor message plus its replies (Slack `thread_ts`). + /// Root vendor message plus its replies (`parentVendorMessageID`). case replyThread(parentVendorMessageID: String) } @@ -86,9 +86,9 @@ public struct MessagingMessageDTO: Codable, Sendable, Hashable, Identifiable { public let sender: String public let body: String public let createdAt: Date - /// Slack `thread_ts` when this row is a reply. Nil for channel-root messages. + /// Vendor parent id when this row is a reply. Nil for conversation-root messages. public var parentVendorMessageID: String? - /// Vendor-reported reply count on a root message (Slack `reply_count`). + /// Vendor-reported reply count on a root message. public var replyCount: Int public init( diff --git a/packages/Structure/Sources/AppLayerServices/AppServices/MessagingInboundNotificationCopy.swift b/packages/Structure/Sources/AppLayerServices/AppServices/MessagingInboundNotificationCopy.swift index e7ea0b1d..9e7adaf6 100644 --- a/packages/Structure/Sources/AppLayerServices/AppServices/MessagingInboundNotificationCopy.swift +++ b/packages/Structure/Sources/AppLayerServices/AppServices/MessagingInboundNotificationCopy.swift @@ -2,7 +2,7 @@ import Foundation /// User-facing notification text for inbound connector messages. public enum MessagingInboundNotificationCopy: Sendable { - /// Slack-style opaque actor IDs (member, bot, channel, group) are not human-readable. + /// Opaque vendor actor IDs (member, bot, channel, group) are not human-readable. public static func isOpaqueVendorActorID(_ sender: String) -> Bool { let trimmed = sender.trimmingCharacters(in: .whitespacesAndNewlines) guard trimmed.count >= 8, let first = trimmed.first else { return false } diff --git a/packages/Structure/Sources/AppLayerServices/SharedAgentRuntime/PluginSecretResolver.swift b/packages/Structure/Sources/AppLayerServices/SharedAgentRuntime/PluginSecretResolver.swift index 30e02280..a577ee7d 100644 --- a/packages/Structure/Sources/AppLayerServices/SharedAgentRuntime/PluginSecretResolver.swift +++ b/packages/Structure/Sources/AppLayerServices/SharedAgentRuntime/PluginSecretResolver.swift @@ -3,8 +3,8 @@ import Foundation /// Resolves declared plugin secrets from Keychain, with a development `.env` escape hatch. public enum PluginSecretResolver: Sendable { /// Field ids the host and daemon accept as an HTTP call credential. - /// Create-time auth preference may store `api_token` when docs look OAuth-only; - /// Slack runtime historically looked only for `bot_token`. + /// Create-time auth preference may store `api_token` when docs look OAuth-only. + /// Older call sites looked only for `bot_token`. public static let callCredentialFieldIDs: [String] = [ "bot_token", "token", diff --git a/packages/Structure/Sources/Plugin/Messaging/ConnectorMessaging.swift b/packages/Structure/Sources/Plugin/Messaging/ConnectorMessaging.swift index b2f084bb..b5687938 100644 --- a/packages/Structure/Sources/Plugin/Messaging/ConnectorMessaging.swift +++ b/packages/Structure/Sources/Plugin/Messaging/ConnectorMessaging.swift @@ -99,7 +99,7 @@ public struct ConnectorMessagingResult: Sendable, Hashable { } } -/// Incremental poll cursors as unix seconds with Slack-style 6 fractional digits. +/// Incremental poll cursors as unix seconds with 6 fractional digits. public enum ConnectorPollCursor: Sendable { public static func unixSeconds(_ date: Date) -> String { String(format: "%.6f", locale: Locale(identifier: "en_US_POSIX"), date.timeIntervalSince1970) diff --git a/ui/MCPService/MCPServiceToolHost.swift b/ui/MCPService/MCPServiceToolHost.swift index 2f1fbd5d..af759cfc 100644 --- a/ui/MCPService/MCPServiceToolHost.swift +++ b/ui/MCPService/MCPServiceToolHost.swift @@ -361,29 +361,6 @@ actor MCPServiceToolHost { return false } - private func legacyExecutionContext(from request: MCPToolCallRequest) -> ExecutionContextWire? { - let active = request.pluginFactoryCreationActive - || MCPServiceCallContext.shared.pluginFactoryCreationActive - || TurnProcessContext.effectivePluginFactoryCreationActive - guard active else { return nil } - switch request.principal { - case .agent(let sessionID, let agentID): - return ExecutionContextWire( - sessionID: sessionID, - principal: request.principal, - agentID: agentID, - capabilities: [.syncWebCrawl, .hostReviewRetry] - ) - default: - return ExecutionContextWire( - sessionID: "legacy-mcp", - principal: request.principal, - agentID: "legacy", - capabilities: [.syncWebCrawl, .hostReviewRetry] - ) - } - } - private static func skillIndex(from repo: DBRepository) async throws -> [PluginSkillDisclosure.IndexEntry] { let summaries = try await repo.listPluginFactoryReleaseSummaries() var latestByPlugin: [String: PluginFactoryReleaseSummary] = [:] diff --git a/ui/ui/DebugLog/LogStore.swift b/ui/ui/DebugLog/LogStore.swift deleted file mode 100644 index 3d0fd823..00000000 --- a/ui/ui/DebugLog/LogStore.swift +++ /dev/null @@ -1,25 +0,0 @@ -import Foundation -import Combine -import OSLog - -/// A thread-safe, observable store for log messages. -@MainActor -final class LogStore: ObservableObject { - @Published private(set) var entries: [LogEntry] = [] - - func log(_ message: String, category: String = "default") { - let entry = LogEntry(message: message, category: category) - entries.append(entry) - // Keep the log from growing indefinitely - if entries.count > 500 { - entries.removeFirst(100) - } - } -} - -struct LogEntry: Identifiable, Hashable { - let id = UUID() - let timestamp = Date() - let message: String - let category: String -} diff --git a/ui/ui/Messaging/MessagingSessionStore.swift b/ui/ui/Messaging/MessagingSessionStore.swift index d9af66a6..c96c20cc 100644 --- a/ui/ui/Messaging/MessagingSessionStore.swift +++ b/ui/ui/Messaging/MessagingSessionStore.swift @@ -37,7 +37,7 @@ final class MessagingSessionStore: ObservableObject { @Published private(set) var lastError: String? @Published private(set) var isMessagingWorkspace = false - /// Local outbound rows shown before Slack ack / poll. Never persisted. + /// Local outbound rows shown before the connector acks the send. Never persisted. private var pendingOutboundIDs: Set = [] private var pendingOutboundByID: [String: MessagingMessageDTO] = [:] @@ -60,7 +60,7 @@ final class MessagingSessionStore: ObservableObject { return agentWorkInFlight.first { $0.parentVendorMessageID == parentID }?.statusLabel } - /// Reply pane label. Never the Slack channel (`selectedThread.title`). + /// Reply pane label. Never the connector conversation title (`selectedThread.title`). var replyThreadTitle: String { guard let parentID = selectedReplyParentVendorMessageID else { return "Thread" } let body = visibleReplyMessages.first(where: { $0.vendorMessageID == parentID })?.body @@ -299,7 +299,7 @@ final class MessagingSessionStore: ObservableObject { persisted.parentVendorMessageID == pending.parentVendorMessageID, abs(persisted.createdAt.timeIntervalSince(pending.createdAt)) < 180 else { return false } - // DB pending rows use pending: until Slack acks; still twins of UI optimistic rows. + // DB pending rows use pending: until the connector acks; still twins of UI optimistic rows. return true } diff --git a/ui/ui/Messaging/Services/MessagingReplyThreadService.swift b/ui/ui/Messaging/Services/MessagingReplyThreadService.swift index ffafb3ee..d3be5723 100644 --- a/ui/ui/Messaging/Services/MessagingReplyThreadService.swift +++ b/ui/ui/Messaging/Services/MessagingReplyThreadService.swift @@ -18,7 +18,7 @@ enum MessagingReplyThreadService { publishPresence() MessagingPollRefreshService.requestPoll() guard let pluginID, let thread else { return } - // Paint from DB first; Slack poll catches peer replies without blocking the pane. + // Paint from DB first; the connector poll catches peer replies without blocking the pane. Task { do { try await connectorRuntime.pollConversation( diff --git a/ui/ui/Session/ChatTabSurfacePolicy.swift b/ui/ui/Session/ChatTabSurfacePolicy.swift index dc8d2a46..78bf7d46 100644 --- a/ui/ui/Session/ChatTabSurfacePolicy.swift +++ b/ui/ui/Session/ChatTabSurfacePolicy.swift @@ -10,7 +10,7 @@ enum ChatTabSurfacePolicy: Sendable { case needsHumanChoice } - /// Slice 1 fallback when no spec Present exists yet. + /// Bind from whether this tab is a messaging connector when no present tree exists yet. static func bind(isMessagingConnector: Bool) -> Binding { if isMessagingConnector { return .decided(.thread) diff --git a/ui/ui/Views/DebugLogView.swift b/ui/ui/Views/DebugLogView.swift deleted file mode 100644 index 2e3abcd1..00000000 --- a/ui/ui/Views/DebugLogView.swift +++ /dev/null @@ -1,24 +0,0 @@ -import SwiftUI - -struct DebugLogView: View { - @EnvironmentObject var logStore: LogStore - - var body: some View { - VStack(alignment: .leading) { - Text("Logs") - .font(.headline) - ScrollView { - VStack(alignment: .leading) { - ForEach(logStore.entries) { entry in - HStack { - Text(entry.timestamp, style: .time) - Text("[\(entry.category)]") - Text(entry.message) - } - } - } - } - } - .padding() - } -} diff --git a/ui/ui/uiApp.swift b/ui/ui/uiApp.swift index 2272fc7e..394fff7b 100644 --- a/ui/ui/uiApp.swift +++ b/ui/ui/uiApp.swift @@ -6,7 +6,6 @@ import DBRepository @main struct uiApp: App { - @StateObject private var logStore = LogStore() @NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate /// Captured at process start so Scene content cannot race AppDelegate. @@ -46,7 +45,6 @@ struct uiApp: App { .accessibilityHidden(true) } else { ContentView() - .environmentObject(logStore) .preferredColorScheme(.light) .background(DerrickMainWindowRegistrar()) }