From bd93f2c5479374eed12e38cb9f3358c9b69714b7 Mon Sep 17 00:00:00 2001 From: showxu <10173746+showxu@users.noreply.github.com> Date: Sun, 29 Nov 2026 12:55:18 +0800 Subject: [PATCH 1/4] fix: remove the obsolete configuration migration --- Agents.xcodeproj/project.pbxproj | 106 +--------- .../xcshareddata/xcschemes/AgentsApp.xcscheme | 1 - Agents/Features/DiagnosticsView.swift | 9 - .../Features/ExistingConfigurationView.swift | 82 -------- Agents/Features/WorkspaceView.swift | 24 --- .../CoreExistingConfiguration.swift | 89 -------- Agents/Integration/CoreReader.swift | 20 +- Agents/Presentation/AppModel.swift | 43 +--- Agents/Presentation/ContentActions.swift | 2 - .../ExistingConfigurationSession.swift | 83 -------- Agents/Presentation/WorkspaceValues.swift | 1 - AgentsTests/ExistingConfigurationTests.swift | 192 ------------------ AgentsUITests/AgentsUITests.swift | 45 ---- Documentation/Application.md | 2 +- Documentation/Release.md | 6 +- README.md | 6 +- 16 files changed, 14 insertions(+), 697 deletions(-) delete mode 100644 Agents/Features/ExistingConfigurationView.swift delete mode 100644 Agents/Integration/CoreExistingConfiguration.swift delete mode 100644 Agents/Presentation/ExistingConfigurationSession.swift delete mode 100644 AgentsTests/ExistingConfigurationTests.swift delete mode 100644 AgentsUITests/AgentsUITests.swift diff --git a/Agents.xcodeproj/project.pbxproj b/Agents.xcodeproj/project.pbxproj index 25edcc1..c529ef2 100644 --- a/Agents.xcodeproj/project.pbxproj +++ b/Agents.xcodeproj/project.pbxproj @@ -24,19 +24,11 @@ remoteGlobalIDString = A00000000000000000000010; remoteInfo = AgentsApp; }; - A00000000000000000000043 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A00000000000000000000001 /* Project object */; - proxyType = 1; - remoteGlobalIDString = A00000000000000000000010; - remoteInfo = AgentsApp; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ A00000000000000000000020 /* Agents App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Agents App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; A00000000000000000000021 /* AgentsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AgentsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - A00000000000000000000022 /* AgentsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AgentsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ @@ -54,13 +46,6 @@ path = AgentsTests; sourceTree = ""; }; - A00000000000000000000006 /* AgentsUITests */ = { - isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - ); - path = AgentsUITests; - sourceTree = ""; - }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -85,13 +70,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A00000000000000000000037 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -100,7 +78,6 @@ children = ( A00000000000000000000004 /* Agents */, A00000000000000000000005 /* AgentsTests */, - A00000000000000000000006 /* AgentsUITests */, A00000000000000000000003 /* Products */, ); sourceTree = ""; @@ -110,7 +87,6 @@ children = ( A00000000000000000000020 /* Agents App.app */, A00000000000000000000021 /* AgentsTests.xctest */, - A00000000000000000000022 /* AgentsUITests.xctest */, ); name = Products; sourceTree = ""; @@ -170,27 +146,6 @@ productReference = A00000000000000000000021 /* AgentsTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - A00000000000000000000012 /* AgentsUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = A00000000000000000000053 /* Build configuration list for PBXNativeTarget "AgentsUITests" */; - buildPhases = ( - A00000000000000000000036 /* Sources */, - A00000000000000000000037 /* Frameworks */, - A00000000000000000000038 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A00000000000000000000041 /* PBXTargetDependency */, - ); - fileSystemSynchronizedGroups = ( - A00000000000000000000006 /* AgentsUITests */, - ); - name = AgentsUITests; - productName = AgentsUITests; - productReference = A00000000000000000000022 /* AgentsUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -208,10 +163,6 @@ CreatedOnToolsVersion = 27.0; TestTargetID = A00000000000000000000010; }; - A00000000000000000000012 = { - CreatedOnToolsVersion = 27.0; - TestTargetID = A00000000000000000000010; - }; }; }; buildConfigurationList = A00000000000000000000050 /* Build configuration list for PBXProject "Agents" */; @@ -234,7 +185,6 @@ targets = ( A00000000000000000000010 /* AgentsApp */, A00000000000000000000011 /* AgentsTests */, - A00000000000000000000012 /* AgentsUITests */, ); }; /* End PBXProject section */ @@ -254,13 +204,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A00000000000000000000038 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -278,13 +221,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A00000000000000000000036 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -293,11 +229,6 @@ target = A00000000000000000000010 /* AgentsApp */; targetProxy = A00000000000000000000042 /* PBXContainerItemProxy */; }; - A00000000000000000000041 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A00000000000000000000010 /* AgentsApp */; - targetProxy = A00000000000000000000043 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -348,7 +279,7 @@ isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; GENERATE_INFOPLIST_FILE = YES; @@ -358,7 +289,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 0.1.0; + MARKETING_VERSION = 0.1.1; PRODUCT_BUNDLE_IDENTIFIER = tools.agents.app; PRODUCT_MODULE_NAME = AgentsApp; PRODUCT_NAME = "Agents App"; @@ -370,7 +301,7 @@ isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; ENABLE_APP_SANDBOX = NO; ENABLE_HARDENED_RUNTIME = YES; GENERATE_INFOPLIST_FILE = YES; @@ -380,7 +311,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 0.1.0; + MARKETING_VERSION = 0.1.1; PRODUCT_BUNDLE_IDENTIFIER = tools.agents.app; PRODUCT_MODULE_NAME = AgentsApp; PRODUCT_NAME = "Agents App"; @@ -410,26 +341,6 @@ }; name = Release; }; - A00000000000000000000060 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GENERATE_INFOPLIST_FILE = YES; - PRODUCT_BUNDLE_IDENTIFIER = tools.agents.app.uitests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_TARGET_NAME = AgentsApp; - }; - name = Debug; - }; - A00000000000000000000061 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GENERATE_INFOPLIST_FILE = YES; - PRODUCT_BUNDLE_IDENTIFIER = tools.agents.app.uitests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_TARGET_NAME = AgentsApp; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -460,15 +371,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A00000000000000000000053 /* Build configuration list for PBXNativeTarget "AgentsUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A00000000000000000000060 /* Debug */, - A00000000000000000000061 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ diff --git a/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme b/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme index d8dcbdc..772ee57 100644 --- a/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme +++ b/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme @@ -14,7 +14,6 @@ - diff --git a/Agents/Features/DiagnosticsView.swift b/Agents/Features/DiagnosticsView.swift index 8f31f8f..689d985 100644 --- a/Agents/Features/DiagnosticsView.swift +++ b/Agents/Features/DiagnosticsView.swift @@ -88,15 +88,6 @@ struct DiagnosticsView: View { Text("Reading configuration…") .foregroundStyle(.secondary) } - case .existingConfigurationAvailable: - HStack(spacing: 10) { - Image(systemName: "doc.badge.plus") - .foregroundStyle(.secondary) - Text("Existing configuration available") - Spacer() - Button("Review Import…") { model.previewExistingConfiguration() } - .disabled(!model.canPreviewExistingConfiguration) - } case .idle, .failed: HStack(spacing: 10) { Image(systemName: "exclamationmark.circle") diff --git a/Agents/Features/ExistingConfigurationView.swift b/Agents/Features/ExistingConfigurationView.swift deleted file mode 100644 index 83d0161..0000000 --- a/Agents/Features/ExistingConfigurationView.swift +++ /dev/null @@ -1,82 +0,0 @@ -import AgentsUpdates -import SwiftUI - -struct ExistingConfigurationView: View { - let model: AppModel - - var body: some View { - if let session = model.existingConfigurationSession { - VStack(alignment: .leading, spacing: 12) { - Text("Review Configuration Import") - .font(.headline) - .padding(.horizontal, 16) - .padding(.top, 16) - Form { - if session.stage == .preparing { - ProgressView("Reading the configuration to import…").controlSize(.small) - } - if let preview = session.preview { - Section("Import Summary") { - LabeledContent("Sources", value: String(preview.sourceCount)) - LabeledContent("Skills", value: String(preview.skillCount)) - LabeledContent( - "Skill installations", value: String(preview.installationCount)) - LabeledContent("Instruction sections", value: String(preview.instructionCount)) - } - Section("Files to Write") { - LabeledContent("New YAML configuration") { - PathView(url: preview.declarationURL, scope: session.scope) - } - LabeledContent("Installation lock") { - PathView(url: preview.ledgerURL, scope: session.scope) - } - LabeledContent("Backup of original lock") { - PathView(url: preview.originalLedgerURL, scope: session.scope) - } - } - DisclosureGroup("Import Source") { - PathView( - url: ExistingConfigurationSession.existingDeclaration( - in: preview.declarationURL.deletingLastPathComponent()), scope: session.scope) - } - } - if session.stale && session.stage == .review { - Label( - "Configuration changed since this preview.", - systemImage: "exclamationmark.triangle") - } - if !session.messages.isEmpty { - Section("Import Unavailable") { - ForEach(session.messages) { diagnostic in - Text(verbatim: diagnostic.message).textSelection(.enabled) - } - } - } - } - .formStyle(.grouped) - - Divider() - HStack { - Button("Cancel") { model.cancelExistingConfiguration() } - .keyboardShortcut(.cancelAction) - .disabled(session.stage == .applying) - .accessibilityIdentifier("existingConfiguration.cancel") - Spacer() - if session.stage == .applying { - ProgressView("Importing…").controlSize(.small) - } else if session.stage == .failed || (session.stage == .review && session.stale) { - Button("Refresh Preview") { model.previewExistingConfiguration() } - .disabled(model.isApplying || model.isTerminating) - } - Button("Import Configuration") { model.applyExistingConfiguration() } - .keyboardShortcut(.defaultAction) - .disabled(!model.canApplyExistingConfiguration) - .accessibilityIdentifier("existingConfiguration.apply") - } - .padding([.horizontal, .bottom], 16) - } - .frame(width: 520, height: session.stage == .preparing ? 185 : 520) - .interactiveDismissDisabled(session.stage == .applying) - } - } -} diff --git a/Agents/Features/WorkspaceView.swift b/Agents/Features/WorkspaceView.swift index 8139e1a..066be06 100644 --- a/Agents/Features/WorkspaceView.swift +++ b/Agents/Features/WorkspaceView.swift @@ -131,11 +131,6 @@ struct WorkspaceView: View { .sheet(item: $model.watchSession) { _ in WatchView(model: model) } .sheet(item: $model.importSession) { _ in ImportView(model: model) } .sheet(item: $model.connectionSession) { _ in ConnectionView(model: model) } - .sheet( - item: Binding( - get: { model.existingConfigurationSession }, - set: { if $0 == nil { model.cancelExistingConfiguration() } }) - ) { _ in ExistingConfigurationView(model: model) } .sheet( item: $model.registrySession, onDismiss: { @@ -204,17 +199,6 @@ struct WorkspaceView: View { ProgressView() Text("Reading configuration…").foregroundStyle(.secondary) }.frame(maxWidth: .infinity, maxHeight: .infinity) - case (_, .existingConfigurationAvailable): - ContentUnavailableView { - Label("Import User Configuration", systemImage: "doc.text") - } description: { - Text("Import your sources, skills, and instructions from agents.json.") - } actions: { - Button("Review Import…") { model.previewExistingConfiguration() } - .buttonStyle(.borderedProminent) - .disabled(!model.canPreviewExistingConfiguration) - .accessibilityIdentifier("existingConfiguration.preview") - } case (_, .failed(let diagnostics)): ContentUnavailableView { Label("Configuration Unavailable", systemImage: "exclamationmark.triangle") @@ -291,10 +275,6 @@ struct WorkspaceView: View { Button("Show Declaration") { model.page = .components } .disabled(model.snapshot == nil) .accessibilityIdentifier("workspace.declaration") - if case .existingConfigurationAvailable = model.loadState { - Button("Review Existing Configuration Import…") { model.previewExistingConfiguration() } - .disabled(!model.canPreviewExistingConfiguration) - } Button("Reveal Scope in Finder") { NSWorkspace.shared.open(model.scope.root) } @@ -334,10 +314,6 @@ struct WorkspaceView: View { systemImage: "exclamationmark.triangle" ) .padding(12).frame(maxWidth: .infinity, alignment: .leading).background(.bar) - } else if model.page == .overview && model.didApplyExistingConfiguration { - Label("Configuration imported", systemImage: "checkmark.circle") - .padding(8).frame(maxWidth: .infinity, alignment: .leading).background(.bar) - .accessibilityIdentifier("existingConfiguration.success") } } } diff --git a/Agents/Integration/CoreExistingConfiguration.swift b/Agents/Integration/CoreExistingConfiguration.swift deleted file mode 100644 index 0a5448d..0000000 --- a/Agents/Integration/CoreExistingConfiguration.swift +++ /dev/null @@ -1,89 +0,0 @@ -import AgentsCore -import AgentsUpdates -import Darwin -import Foundation - -struct ExistingConfigurationReview: Sendable { - let preview: ExistingGlobalConfigurationPreview - let inputs: ExistingConfigurationInputs -} - -/// The exact configuration files watched by the App. Core owns the full apply preconditions. -struct ExistingConfigurationInputs: Sendable { - private enum Stamp: Equatable, Sendable { - case missing - case unreadable - case present( - device: dev_t, inode: ino_t, size: off_t, - modifiedSeconds: Int, modifiedNanoseconds: Int, - changedSeconds: Int, changedNanoseconds: Int) - - init(at url: URL) { - var info = stat() - guard lstat(url.path, &info) == 0 else { - self = errno == ENOENT ? .missing : .unreadable - return - } - self = .present( - device: info.st_dev, inode: info.st_ino, size: info.st_size, - modifiedSeconds: info.st_mtimespec.tv_sec, modifiedNanoseconds: info.st_mtimespec.tv_nsec, - changedSeconds: info.st_ctimespec.tv_sec, changedNanoseconds: info.st_ctimespec.tv_nsec) - } - } - - private let files: [URL: Stamp] - - init(store: StateStore) { - files = Dictionary( - uniqueKeysWithValues: CoreReader.stateDependencies(store: store).map { - ($0.url, Stamp(at: $0.url)) - }) - } - - var hasChanged: Bool { - files.contains { $0.value == .unreadable || Stamp(at: $0.key) != $0.value } - } -} - -extension CoreActions { - func previewExistingConfiguration(in scope: WorkspaceScope) -> CoreCompletion { - do { - let environment = environment(for: scope) - let inputs = ExistingConfigurationInputs( - store: StateStore(scope: .user, environment: environment)) - let preview = try ExistingGlobalConfiguration.preview(environment: environment) - let review = ExistingConfigurationReview(preview: preview, inputs: inputs) - return CoreCompletion(disposition: .completed, output: .existingConfigurationPreview(review)) - } catch { - return existingConfigurationFailure( - error, in: scope, operation: "Preview existing configuration") - } - } - - func applyExistingConfiguration( - _ preview: ExistingGlobalConfigurationPreview, in scope: WorkspaceScope - ) - -> CoreCompletion - { - do { - try ExistingGlobalConfiguration.apply(preview) - return CoreCompletion(disposition: .completed) - } catch { - return existingConfigurationFailure( - error, in: scope, operation: "Apply existing configuration") - } - } - - private func existingConfigurationFailure( - _ error: any Error, in scope: WorkspaceScope, operation: String - ) - -> CoreCompletion - { - let suggestion = (error as? any LocalizedError)?.recoverySuggestion - let message = [error.localizedDescription, suggestion].compactMap { $0 } - .joined(separator: "\n") - return CoreCompletion( - disposition: .failed, - diagnostics: [AppDiagnostic(scope: scope, operation: operation, message: message)]) - } -} diff --git a/Agents/Integration/CoreReader.swift b/Agents/Integration/CoreReader.swift index 703d7c6..7bcd2aa 100644 --- a/Agents/Integration/CoreReader.swift +++ b/Agents/Integration/CoreReader.swift @@ -115,21 +115,9 @@ struct CoreReader: Sendable { disposition: .completed, snapshot: snapshot, diagnostics: [], readDependencies: readDependencies) } catch { - var diagnostics = Self.diagnostics(error, scope: scope, operation: "Read configuration") - if scope.kind == .user { - do { - if try ExistingGlobalConfiguration.isAvailable(environment: runtime) { - return CoreCompletion(disposition: .completed, output: .existingConfigurationAvailable) - } - } catch { - diagnostics.append( - AppDiagnostic( - scope: scope, operation: "Check for existing configuration", - message: error.localizedDescription)) - } - } return CoreCompletion( - disposition: .failed, snapshot: nil, diagnostics: diagnostics) + disposition: .failed, + diagnostics: Self.diagnostics(error, scope: scope, operation: "Read configuration")) } } @@ -179,10 +167,6 @@ struct CoreReader: Sendable { for selection in selections { if case .local(let url) = selection?.source { dependencies.append(.entry(url)) } } - if store.scope == .user { - dependencies.append( - .entry(ExistingConfigurationSession.existingDeclaration(in: store.directory))) - } return dependencies } diff --git a/Agents/Presentation/AppModel.swift b/Agents/Presentation/AppModel.swift index 4c2d2c3..5be57da 100644 --- a/Agents/Presentation/AppModel.swift +++ b/Agents/Presentation/AppModel.swift @@ -37,8 +37,6 @@ final class AppModel { case apply(UUID) case packageActionTest case packageActionWrite - case existingConfigurationPreview(UUID) - case existingConfigurationApply(UUID) case mappings(UUID) case other } @@ -139,8 +137,6 @@ final class AppModel { var skillTargetsUpdateSession: UpdateSession? { activeUpdateSession?.proposal.presentation == .skillTargets ? activeUpdateSession : nil } - var existingConfigurationSession: ExistingConfigurationSession? - private(set) var didApplyExistingConfiguration = false var registrySession: RegistrySession? var packageScope: WorkspaceScope? var catalogSession: CatalogSession? @@ -159,7 +155,7 @@ final class AppModel { var isApplying: Bool { operations.values.contains { switch $0.purpose { - case .apply, .existingConfigurationApply, .creation, .watchApply, .watchSeen, + case .apply, .creation, .watchApply, .watchSeen, .clientRestoreWrite, .packageActionTest, .packageActionWrite: return true default: return false @@ -242,9 +238,7 @@ final class AppModel { } cancelAssistance() cancelConnection() - cancelExistingConfiguration() promptSession?.stage = .outdated - didApplyExistingConfiguration = false self.scope = scope preferences.selectedScopeID = scope.id selectedSourceRecord = nil @@ -829,24 +823,6 @@ final class AppModel { activeUpdateSession?.messages = result.diagnostics activeUpdateSession?.terminal = result.updateTerminal activeUpdateSession?.stage = result.disposition == .cancelled ? .cancelled : .finished - case .existingConfigurationPreview(let id) where existingConfigurationSession?.id == id: - existingConfigurationSession?.messages = result.diagnostics - if case .existingConfigurationPreview(let review) = result.output { - existingConfigurationSession?.review = review - existingConfigurationSession?.stage = .review - invalidateExistingConfigurationIfChanged() - } else { - existingConfigurationSession?.stage = .failed - } - case .existingConfigurationApply(let id) where existingConfigurationSession?.id == id: - if result.disposition == .completed { - existingConfigurationSession = nil - didApplyExistingConfiguration = true - page = .overview - } else { - existingConfigurationSession?.messages = result.diagnostics - existingConfigurationSession?.stage = .failed - } default: break } } @@ -977,7 +953,6 @@ final class AppModel { importSession?.stale = true connectionSession?.stale = true connectionSession?.inputs = [:] - invalidateExistingConfigurationIfChanged() if let session = activeUpdateSession, !session.isInstructionOutputPreview, session.stage == .review || session.stage == .preparing { @@ -1010,13 +985,6 @@ final class AppModel { } } - private func invalidateExistingConfigurationIfChanged() { - guard let session = existingConfigurationSession, session.stage == .review, - !session.stale, session.review?.inputs.hasChanged == true - else { return } - existingConfigurationSession?.stale = true - } - func cancelQueuedOperations() { for operation in operations.values { operation.admission.cancel() } for task in asyncTasks.values { task.cancel() } @@ -1115,23 +1083,16 @@ final class AppModel { } else if case .userSkillReferences(let items) = result.output, var snapshot, snapshot.scope == scope { snapshot.skillWorkspaceItems = snapshot.skillWorkspaceItems.filter { $0.scope == scope } + items loadState = .loaded(snapshot) - } else if case .workspace = operation.purpose, - case .existingConfigurationAvailable = result.output - { - loadState = .existingConfigurationAvailable - readsStale = refreshPending - selectedSkillID = nil } else if case .workspace = operation.purpose, case .failed = result.disposition { loadState = .failed(result.diagnostics) selectedSkillID = nil } else if case .workspace = operation.purpose, case .cancelled = result.disposition { loadState = .idle } - if case .workspace = operation.purpose { invalidateExistingConfigurationIfChanged() } } if !isTerminating && currentSelection { switch operation.purpose { - case .apply, .existingConfigurationApply, .creation, .watchApply, .watchSeen, + case .apply, .creation, .watchApply, .watchSeen, .clientRestoreWrite, .packageActionWrite: refresh() default: break diff --git a/Agents/Presentation/ContentActions.swift b/Agents/Presentation/ContentActions.swift index 2e7eab0..2011a8a 100644 --- a/Agents/Presentation/ContentActions.swift +++ b/Agents/Presentation/ContentActions.swift @@ -87,8 +87,6 @@ enum ContentOutput: Sendable { case packageLock(MarketplaceLockReport) case packageActionResults([LifecycleActionResult]) case packageActionSave(LifecycleSaveResult) - case existingConfigurationAvailable - case existingConfigurationPreview(ExistingConfigurationReview) case mappings(UUID, [MappingItem]) } diff --git a/Agents/Presentation/ExistingConfigurationSession.swift b/Agents/Presentation/ExistingConfigurationSession.swift deleted file mode 100644 index c9186ef..0000000 --- a/Agents/Presentation/ExistingConfigurationSession.swift +++ /dev/null @@ -1,83 +0,0 @@ -import AgentsUpdates -import Foundation - -struct ExistingConfigurationSession: Identifiable { - enum Stage { case preparing, review, applying, failed } - - let id = UUID() - let scope: WorkspaceScope - var stage: Stage = .preparing - var review: ExistingConfigurationReview? - var stale = false - var messages: [AppDiagnostic] = [] - - var preview: ExistingGlobalConfigurationPreview? { review?.preview } - - static func existingDeclaration(in directory: URL) -> URL { - directory.appendingPathComponent("agents.json") - } -} - -extension AppModel { - var canPreviewExistingConfiguration: Bool { - if case .existingConfigurationAvailable = loadState { - return scope.kind == .user && !isTerminating && !isApplying - } - return false - } - - var canApplyExistingConfiguration: Bool { - canPreviewExistingConfiguration && existingConfigurationSession?.stage == .review - && existingConfigurationSession?.stale == false - } - - func previewExistingConfiguration() { - guard scope.kind == .user, !isTerminating, !isApplying else { return } - if let session = existingConfigurationSession { - guard session.stage == .failed || (session.stage == .review && session.stale) else { - return - } - existingConfigurationSession?.stage = .preparing - existingConfigurationSession?.stale = false - existingConfigurationSession?.messages = [] - existingConfigurationSession?.review = nil - } else { - guard canPreviewExistingConfiguration else { return } - existingConfigurationSession = ExistingConfigurationSession(scope: scope) - } - guard let session = existingConfigurationSession else { return } - let scope = session.scope - let actions = actions - startOperation( - title: "Preview existing configuration", scope: scope, - purpose: .existingConfigurationPreview(session.id) - ) { - actions.previewExistingConfiguration(in: scope) - } - } - - func applyExistingConfiguration() { - guard canApplyExistingConfiguration, let session = existingConfigurationSession, - let preview = session.preview - else { return } - existingConfigurationSession?.stage = .applying - let scope = session.scope - let actions = actions - startOperation( - title: "Apply existing configuration", scope: scope, - purpose: .existingConfigurationApply(session.id) - ) { - actions.applyExistingConfiguration(preview, in: scope) - } - } - - func cancelExistingConfiguration() { - guard let session = existingConfigurationSession, session.stage != .applying else { return } - for operation in operations.values { - if case .existingConfigurationPreview(let id) = operation.purpose, id == session.id { - operation.admission.cancel() - } - } - existingConfigurationSession = nil - } -} diff --git a/Agents/Presentation/WorkspaceValues.swift b/Agents/Presentation/WorkspaceValues.swift index 5400527..837213e 100644 --- a/Agents/Presentation/WorkspaceValues.swift +++ b/Agents/Presentation/WorkspaceValues.swift @@ -235,6 +235,5 @@ enum WorkspaceLoadState { case idle case loading case loaded(WorkspaceSnapshot) - case existingConfigurationAvailable case failed([AppDiagnostic]) } diff --git a/AgentsTests/ExistingConfigurationTests.swift b/AgentsTests/ExistingConfigurationTests.swift deleted file mode 100644 index c964354..0000000 --- a/AgentsTests/ExistingConfigurationTests.swift +++ /dev/null @@ -1,192 +0,0 @@ -import Foundation -import Testing - -@testable import AgentsApp - -@MainActor @Suite("Use existing configuration") -struct ExistingConfigurationTests { - @Test func initialUserReadOffersPreviewAndCancelLeavesFilesUnchanged() async throws { - let fixture = try TestFixture() - defer { try? fixture.remove() } - try writeExistingConfiguration(fixture.home.appendingPathComponent(".agents")) - let before = try fixture.entries() - let model = makeModel(fixture) - defer { _ = model.requestTermination() } - #expect(model.page == .overview) - #expect(model.scope.kind == .user) - model.refresh() - try await waitUntil { model.canPreviewExistingConfiguration && model.operations.isEmpty } - - model.previewExistingConfiguration() - try await waitUntil { model.canApplyExistingConfiguration } - let preview = try #require(model.existingConfigurationSession?.preview) - #expect(preview.declarationURL.lastPathComponent == "agents.yaml") - #expect(preview.ledgerURL.lastPathComponent == "agents.resolved") - #expect(preview.originalLedgerURL != preview.ledgerURL) - #expect(try fixture.entries() == before) - model.cancelExistingConfiguration() - model.applyExistingConfiguration() - #expect(model.existingConfigurationSession == nil) - #expect(model.operations.isEmpty) - #expect(try fixture.entries() == before) - } - - @Test func directoryNotificationDuringPreviewKeepsUnchangedFilesReviewable() async throws { - let fixture = try TestFixture() - defer { try? fixture.remove() } - let boundary = try FixtureEventBoundary(root: fixture.root) - defer { boundary.stop() } - let directory = fixture.home.appendingPathComponent(".agents") - try writeExistingConfiguration(directory) - try FileManager.default.setAttributes([.posixPermissions: 0o755], ofItemAtPath: directory.path) - try await boundary.settle( - creation: directory.appendingPathComponent("agents.resolved"), - root: fixture.root) - let before = try fixture.entries() - let model = makeModel(fixture) - defer { _ = model.requestTermination() } - model.refresh() - try await waitUntil { model.canPreviewExistingConfiguration && model.operations.isEmpty } - - let gate = DispatchSemaphore(value: 0) - defer { gate.signal() } - let (events, entered) = AsyncStream.makeStream(of: Void.self) - model.startOperation(title: "Hold preview worker", scope: model.scope) { - entered.yield(()) - gate.wait() - return CoreCompletion(disposition: .completed) - } - var event = events.makeAsyncIterator() - _ = await event.next() - model.previewExistingConfiguration() - try #require(model.existingConfigurationSession?.stage == .preparing) - - let change = Process() - change.executableURL = URL(fileURLWithPath: "/bin/chmod") - change.arguments = ["700", directory.path] - try change.run() - change.waitUntilExit() - try #require(change.terminationStatus == 0) - try await waitUntil { - model.operations.values.contains { operation in - if case .workspace = operation.purpose { return true } - return false - } - } - - gate.signal() - try await waitUntil { model.operations.isEmpty } - #expect(model.canApplyExistingConfiguration) - #expect(try fixture.entries() == before) - } - - @Test func changedExistingDeclarationRequiresFreshPreviewThenReloadsOverview() async throws { - let fixture = try TestFixture() - defer { try? fixture.remove() } - let directory = fixture.home.appendingPathComponent(".agents") - try writeExistingConfiguration(directory) - let model = makeModel(fixture) - defer { _ = model.requestTermination() } - model.refresh() - try await waitUntil { model.canPreviewExistingConfiguration && model.operations.isEmpty } - model.previewExistingConfiguration() - try await waitUntil { model.canApplyExistingConfiguration } - - let existingDeclaration = directory.appendingPathComponent("agents.json") - let replacement = "{\"agents\":[\"codex\"],\"sources\":{}}\n" - try fixture.externalWrite(replacement, to: existingDeclaration, atomic: true) - try await waitUntil { - model.existingConfigurationSession?.stale == true && model.canPreviewExistingConfiguration - && model.operations.isEmpty - } - let before = try fixture.entries() - #expect(!model.canApplyExistingConfiguration) - model.applyExistingConfiguration() - #expect(model.operations.isEmpty) - #expect(try fixture.entries() == before) - - model.previewExistingConfiguration() - try await waitUntil { model.canApplyExistingConfiguration } - let preview = try #require(model.existingConfigurationSession?.preview) - let originalLedger = try Data(contentsOf: preview.ledgerURL) - model.applyExistingConfiguration() - #expect(model.isApplying) - try await waitUntil { model.snapshot?.document != nil && model.operations.isEmpty } - - #expect(!model.isApplying) - #expect(model.existingConfigurationSession == nil) - #expect(model.didApplyExistingConfiguration) - #expect(model.page == .overview) - #expect(model.snapshot?.effectiveDefaultAgents.map(\.rawValue) == ["codex"]) - #expect(try Data(contentsOf: existingDeclaration) == Data(replacement.utf8)) - #expect(try Data(contentsOf: preview.originalLedgerURL) == originalLedger) - } - - @Test func projectPairKeepsOrdinaryReadFailure() async throws { - let fixture = try TestFixture() - defer { try? fixture.remove() } - try writeExistingConfiguration(fixture.home.appendingPathComponent(".agents")) - try writeExistingConfiguration(fixture.project.appendingPathComponent(".agent")) - let before = try fixture.entries() - let model = makeModel(fixture) - defer { _ = model.requestTermination() } - model.select(.init(kind: .project, root: fixture.project)) - try await waitUntil { model.operations.isEmpty } - guard case .failed(let diagnostics) = model.loadState else { - Issue.record("Expected the ordinary project read error") - return - } - #expect(!diagnostics.isEmpty) - #expect(!model.canPreviewExistingConfiguration) - model.previewExistingConfiguration() - #expect(model.existingConfigurationSession == nil) - #expect(try fixture.entries() == before) - } - - @Test func unsafeExistingConfigurationShowsPreviewErrorWithoutWriting() async throws { - let fixture = try TestFixture() - defer { try? fixture.remove() } - let directory = fixture.home.appendingPathComponent(".agents") - try writeExistingConfiguration(directory) - try Data("{\"instructions\":{\"sections\":[\"team-style\"]}}\n".utf8) - .write(to: directory.appendingPathComponent("agents.json")) - let before = try fixture.entries() - let model = makeModel(fixture) - defer { _ = model.requestTermination() } - model.refresh() - try await waitUntil { model.canPreviewExistingConfiguration && model.operations.isEmpty } - model.previewExistingConfiguration() - try await waitUntil { model.existingConfigurationSession?.stage == .failed } - - #expect(model.existingConfigurationSession?.messages.isEmpty == false) - #expect(model.existingConfigurationSession?.preview == nil) - #expect(!model.canApplyExistingConfiguration) - #expect(!model.didApplyExistingConfiguration) - #expect(try fixture.entries() == before) - } - - private func makeModel(_ fixture: TestFixture) -> AppModel { - AppModel( - home: fixture.home, preferences: AppPreferences(defaults: nil), - processEnvironment: fixture.environment) - } - - private func writeExistingConfiguration(_ directory: URL) throws { - try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) - try Data("{\"agents\":[],\"sources\":{}}\n".utf8) - .write(to: directory.appendingPathComponent("agents.json")) - try Data( - """ - {"version":1,"sources":{},"skills":{},"instructions":{"sections":[],"chatgpt":{},"targets":{}}} - """.utf8 - ).write(to: directory.appendingPathComponent("agents.resolved")) - } - - private func waitUntil(_ condition: () -> Bool) async throws { - for _ in 0..<1600 { - if condition() { return } - try await Task.sleep(for: .milliseconds(5)) - } - try #require(condition()) - } -} diff --git a/AgentsUITests/AgentsUITests.swift b/AgentsUITests/AgentsUITests.swift deleted file mode 100644 index 439f77d..0000000 --- a/AgentsUITests/AgentsUITests.swift +++ /dev/null @@ -1,45 +0,0 @@ -import XCTest - -final class AgentsUITests: XCTestCase { - @MainActor - func testExistingConfigurationPreviewOpensFromInitialOverviewAndCanBeCancelled() throws { - let root = URL(fileURLWithPath: #filePath).deletingLastPathComponent() - .deletingLastPathComponent().appendingPathComponent(".agent/evidence/m3/fixtures") - .appendingPathComponent(UUID().uuidString) - let directory = root.appendingPathComponent("home/.agents") - try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) - defer { try? FileManager.default.removeItem(at: root) } - - let declaration = directory.appendingPathComponent("agents.json") - let ledger = directory.appendingPathComponent("agents.resolved") - let declarationBytes = Data("{\"agents\":[],\"sources\":{}}\n".utf8) - let ledgerBytes = Data( - """ - {"version":1,"sources":{},"skills":{},"instructions":{"sections":[],"chatgpt":{},"targets":{}}} - """.utf8) - try declarationBytes.write(to: declaration) - try ledgerBytes.write(to: ledger) - - let app = XCUIApplication() - app.launchEnvironment["AGENTS_APP_TESTING"] = "1" - app.launchEnvironment["AGENTS_APP_FIXTURE_ROOT"] = root.path - app.launch() - defer { app.terminate() } - - let preview = app.buttons["existingConfiguration.preview"] - XCTAssertTrue(preview.waitForExistence(timeout: 10)) - XCTAssertEqual(preview.label, "Review Import…") - preview.click() - let apply = app.buttons["existingConfiguration.apply"] - XCTAssertTrue(apply.wait(for: \.isEnabled, toEqual: true, timeout: 10)) - XCTAssertEqual(apply.label, "Import Configuration") - app.buttons["existingConfiguration.cancel"].click() - XCTAssertTrue(apply.waitForNonExistence(timeout: 5)) - XCTAssertTrue(preview.isEnabled) - XCTAssertEqual(try Data(contentsOf: declaration), declarationBytes) - XCTAssertEqual(try Data(contentsOf: ledger), ledgerBytes) - XCTAssertEqual( - try FileManager.default.contentsOfDirectory(atPath: directory.path).sorted(), - ["agents.json", "agents.resolved"]) - } -} diff --git a/Documentation/Application.md b/Documentation/Application.md index 2e5a689..c6ebf71 100644 --- a/Documentation/Application.md +++ b/Documentation/Application.md @@ -137,4 +137,4 @@ The framework is weak-linked for the macOS 15 deployment target and used only be The shared scheme isolates its test host through explicit Debug-only test inputs and in-memory preferences. A Debug launch may also supply `--agents-fixture-root `; that directory contains `home` and `project` subdirectories prepared by the developer. The launch input does not create fixtures. Release builds ignore these inputs. -Unit tests exercise operation ownership and quit decisions with controlled worker and cleanup timing, stale-selection diagnostics, real Core reads, invalid/orphan configuration, no-write browsing, fixture-only creation and overwrite refusal, real prompt rendering and mappings, typed edit/preview/apply, fingerprint rejection, full restore, source discovery, ephemeral runtime input, source-map presentation, real file-event invalidation and assistance ownership/privacy projection. Unconditional integration failures remain acceptance blockers. UI acceptance uses the designated computer-use surface; the UI-test target is present without a second automation implementation. +Unit tests exercise operation ownership and quit decisions with controlled worker and cleanup timing, stale-selection diagnostics, real Core reads, invalid/orphan configuration, no-write browsing, fixture-only creation and overwrite refusal, real prompt rendering and mappings, typed edit/preview/apply, fingerprint rejection, full restore, source discovery, ephemeral runtime input, source-map presentation, real file-event invalidation and assistance ownership/privacy projection. Unconditional integration failures remain acceptance blockers. UI acceptance uses the designated computer-use surface. diff --git a/Documentation/Release.md b/Documentation/Release.md index 6f26b04..1bb9007 100644 --- a/Documentation/Release.md +++ b/Documentation/Release.md @@ -1,6 +1,6 @@ # Releasing Agents App -GitHub Releases distributes a universal ZIP for Apple silicon and Intel Macs running macOS 15 or later. The release links a SHA-256 checksum alongside the ZIP. Run `shasum -a 256 -c Agents-App-0.1.0-universal.zip.sha256` from the directory containing both files to verify the first release. +GitHub Releases distributes a universal ZIP for Apple silicon and Intel Macs running macOS 15 or later. The release links a SHA-256 checksum alongside the ZIP. From the directory containing both files, pass the downloaded `.sha256` file to `shasum -a 256 -c`. ## Repository setup @@ -11,8 +11,8 @@ GitHub Releases distributes a universal ZIP for Apple silicon and Intel Macs run ## Publish -1. Confirm the accepted release commit is the tip of `master` and its **Check** workflow passed on the master-branch push. Check the app target's Release `MARKETING_VERSION` in `Agents.xcodeproj`. For the first release it is `0.1.0`. -2. After the owner approves the tag, create and push the annotated `v0.1.0` tag at the exact accepted commit. Keep published tags fixed. +1. Confirm the accepted release commit is the tip of `master` and its **Check** workflow passed on the master-branch push. Check the app target's Release `MARKETING_VERSION` and `CURRENT_PROJECT_VERSION` in `Agents.xcodeproj`. +2. After the owner approves the tag, create and push the annotated tag formed by prefixing the marketing version with `v` at the exact accepted commit. Keep published tags fixed. 3. Dispatch the **Release** workflow on `master` with the `publish` operation, tag, and full tagged source SHA. The dispatch commit must descend from the tagged source. The workflow allows differences in the release workflow, its three scripts, and this release guide. It checks the remote tag and requires a successful **Check** from a push to `master` for both the tagged commit and dispatch commit before the protected job starts. 4. The production job archives both architectures from a detached checkout of the tagged source using its committed package lock. The release scripts run from the master dispatch checkout. The job signs with Developer ID and a secure timestamp, notarizes with the Team API key, and staples and verifies the app extracted from the final ZIP. It preserves the signed ZIP, checksum, source SHA, tag object SHA, and packaging commit SHA before creating or completing a draft release. It then verifies the unauthenticated public downloads against that candidate. diff --git a/README.md b/README.md index 909c502..192b3ec 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,7 @@ provides a SHA-256 checksum for the ZIP. ## Quick start 1. Open **Agents App** and select **User Configuration** in the scope picker to - work with user-level configuration. If you see **Import User Configuration**, - choose **Review Import…** to preview the sources, skills, and instructions - available from an existing `agents.json`. + work with user-level configuration. 2. For a project, open **Scope Actions**, choose **Add Project…**, and select the project directory. Pick that project in the scope picker to inspect and manage its configuration. The project list is stored in app preferences. @@ -69,7 +67,7 @@ provides a SHA-256 checksum for the ZIP. ## Development Open `Agents.xcodeproj` in Xcode 27 and select the `AgentsApp` scheme. The -project uses Swift 6, includes app, unit-test, and UI-test targets, and pins +project uses Swift 6, includes app and unit-test targets, and pins [Agents Core](https://github.com/agents-tools/core) to a full commit. That revision must be available for package resolution. Local Debug builds use ad hoc signing. From 3e69d1e72f8d4206e0bc36c95f6ea65d6d35fe0d Mon Sep 17 00:00:00 2001 From: showxu <10173746+showxu@users.noreply.github.com> Date: Sun, 29 Nov 2026 13:00:03 +0800 Subject: [PATCH 2/4] test: remove the legacy UI fixture launch hook --- .../xcshareddata/xcschemes/AgentsApp.xcscheme | 4 ---- Agents/App/AgentsApp.swift | 9 --------- Documentation/Application.md | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme b/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme index 772ee57..64e07ea 100644 --- a/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme +++ b/Agents.xcodeproj/xcshareddata/xcschemes/AgentsApp.xcscheme @@ -8,10 +8,6 @@ - - - - diff --git a/Agents/App/AgentsApp.swift b/Agents/App/AgentsApp.swift index a0d094d..b8b0344 100644 --- a/Agents/App/AgentsApp.swift +++ b/Agents/App/AgentsApp.swift @@ -113,15 +113,6 @@ struct LaunchInput { static var current: Self { let environment = ProcessInfo.processInfo.environment #if DEBUG - if environment["AGENTS_APP_TESTING"] == "1", - let path = environment["AGENTS_APP_FIXTURE_ROOT"], path.hasPrefix("/") - { - let root = URL(fileURLWithPath: path, isDirectory: true) - let home = root.appendingPathComponent("home", isDirectory: true) - return Self( - home: home, projects: [], isFixture: true, - environment: ["HOME": home.path, "PATH": "/usr/bin:/bin:/usr/sbin:/sbin"]) - } let arguments = ProcessInfo.processInfo.arguments if let index = arguments.firstIndex(of: "--agents-fixture-root"), arguments.indices.contains(index + 1), arguments[index + 1].hasPrefix("/") diff --git a/Documentation/Application.md b/Documentation/Application.md index c6ebf71..046a523 100644 --- a/Documentation/Application.md +++ b/Documentation/Application.md @@ -135,6 +135,6 @@ The framework is weak-linked for the macOS 15 deployment target and used only be ## Development validation -The shared scheme isolates its test host through explicit Debug-only test inputs and in-memory preferences. A Debug launch may also supply `--agents-fixture-root `; that directory contains `home` and `project` subdirectories prepared by the developer. The launch input does not create fixtures. Release builds ignore these inputs. +The unit tests supply isolated fixture roots and in-memory preferences. For manual UI acceptance, a Debug launch may supply `--agents-fixture-root `; that directory contains `home` and `project` subdirectories prepared by the developer. The launch input does not create fixtures. Release builds ignore these inputs. Unit tests exercise operation ownership and quit decisions with controlled worker and cleanup timing, stale-selection diagnostics, real Core reads, invalid/orphan configuration, no-write browsing, fixture-only creation and overwrite refusal, real prompt rendering and mappings, typed edit/preview/apply, fingerprint rejection, full restore, source discovery, ephemeral runtime input, source-map presentation, real file-event invalidation and assistance ownership/privacy projection. Unconditional integration failures remain acceptance blockers. UI acceptance uses the designated computer-use surface. From 0713af8e0b7ee7490ef4785cbce9b985d63310b8 Mon Sep 17 00:00:00 2001 From: showxu <10173746+showxu@users.noreply.github.com> Date: Sun, 29 Nov 2026 13:01:46 +0800 Subject: [PATCH 3/4] build: select the current Core configuration API --- Agents.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Agents.xcodeproj/project.pbxproj b/Agents.xcodeproj/project.pbxproj index c529ef2..65b01bc 100644 --- a/Agents.xcodeproj/project.pbxproj +++ b/Agents.xcodeproj/project.pbxproj @@ -379,7 +379,7 @@ repositoryURL = "https://github.com/agents-tools/core"; requirement = { kind = revision; - revision = 7ccd7cb955fc168e4dd5a61d42bc12f292c58a01; /* 0.3.0 */ + revision = a2b665cbd4ad07aa8df0e191742f53855d699940; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 093ca03..a891abd 100644 --- a/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,7 +6,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/agents-tools/core", "state" : { - "revision" : "7ccd7cb955fc168e4dd5a61d42bc12f292c58a01" + "revision" : "a2b665cbd4ad07aa8df0e191742f53855d699940" } }, { @@ -95,7 +95,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/modelcontextprotocol/swift-sdk.git", "state" : { - "revision" : "a0ae212ebf6eab5f754c3129608bc5557637e605" + "revision" : "a0ae212ebf6eab5f754c3129608bc5557637e605", + "version" : "0.12.1" } }, { From 87a9db8ae15bafd113dbdcc0c0786add9417e37c Mon Sep 17 00:00:00 2001 From: showxu <10173746+showxu@users.noreply.github.com> Date: Sun, 29 Nov 2026 14:39:06 +0800 Subject: [PATCH 4/4] chore: pin Core 0.3.1 --- Agents.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Agents.xcodeproj/project.pbxproj b/Agents.xcodeproj/project.pbxproj index 65b01bc..1fd9967 100644 --- a/Agents.xcodeproj/project.pbxproj +++ b/Agents.xcodeproj/project.pbxproj @@ -379,7 +379,7 @@ repositoryURL = "https://github.com/agents-tools/core"; requirement = { kind = revision; - revision = a2b665cbd4ad07aa8df0e191742f53855d699940; + revision = ce6640adeb53ce0152134547938a6e13472e28b5; /* 0.3.1 */ }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a891abd..5b6b9cb 100644 --- a/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Agents.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,7 +6,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/agents-tools/core", "state" : { - "revision" : "a2b665cbd4ad07aa8df0e191742f53855d699940" + "revision" : "ce6640adeb53ce0152134547938a6e13472e28b5" } }, {