Skip to content

[Feature]: Add tools to discover checked out Swift Package dependencies (so that the agent can access them) #106

@SwiftedMind

Description

@SwiftedMind

Feature Description

Hey,

would it be possible to add some tools that let an agent discover and access Swift package dependencies inside of a Swift package or Xcode project?

Right now, the agent doesn't really have easy access to those Swift packages (for Xcode projects, the checkouts are in the DerivedData, for example). But by using xcodebuild -resolvePackageDependencies -clonedSourcePackagesDirPath ".someLocalDirectory" it might be possible to clone them into the project directory, so that some tools can provide a list of available Swift packages to the agent as well as the path to the respective checkout directory with the contents of the package.

With that path, the agent could use bash commands to search through the package and figure out its API and how it's working etc.

Use Cases

  • When working with external Swift packages, the agent sometimes struggles with the exact API of the types, or misunderstands how it is working
  • Giving it easy access to the checked out Swift packages makes it possible for it to look through it as needed and figure out how a specific package is working exactly and/or read the package documentation etc.

Example Interactions

You: Fix the issues in @MyFile.swift

// MyFile.swift

import SomeExternalSwiftPackage

//  ...

SomeExternalType.doThisAwesomeThing(wrongParameter: "Hello, World")

Agent: {Recognizes that this is an external package dependency, so it calls the discover_external_packages tool, finds the path to the "SomeExternalSwiftPackage" package and uses grep to search for the doThisAwesomeThing method to figure out what's wrong}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions