Fix inbox creation issues in agent coordinator

- Fixed Task.new/3 to handle both maps and keyword lists
- Added robust inbox existence checking in find_available_agent
- Ensure inbox creation during agent registration and task assignment
- Add helper function ensure_inbox_exists to avoid crashes
This commit is contained in:
Ra
2025-08-23 14:46:28 -07:00
parent 5048db99c7
commit 943d8ad4d7
40 changed files with 7798 additions and 404 deletions

67
mix.exs
View File

@@ -1,13 +1,33 @@
defmodule AgentCoordinator.MixProject do
use Mix.Project
@version "0.1.0"
@source_url "https://github.com/your-username/agent_coordinator"
def project do
[
app: :agent_coordinator,
version: "0.1.0",
elixir: "~> 1.18",
version: @version,
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
deps: deps()
deps: deps(),
name: "AgentCoordinator",
description: description(),
package: package(),
docs: docs(),
source_url: @source_url,
homepage_url: @source_url,
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: [:mix]
],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
]
end
@@ -26,7 +46,46 @@ defmodule AgentCoordinator.MixProject do
{:gnat, "~> 1.8"},
{:phoenix_pubsub, "~> 2.1"},
{:gen_stage, "~> 1.2"},
{:uuid, "~> 1.1"}
{:uuid, "~> 1.1"},
# Development and testing dependencies
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: [:dev], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: :test}
]
end
defp description do
"""
A distributed task coordination system for AI agents built with Elixir and NATS.
Enables multiple AI agents (Claude Code, GitHub Copilot, etc.) to work collaboratively
on the same codebase without conflicts through centralized task management,
file-level locking, and real-time communication.
"""
end
defp package do
[
maintainers: ["Your Name"],
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Changelog" => "#{@source_url}/blob/main/CHANGELOG.md"
},
files: ~w(lib .formatter.exs mix.exs README.md LICENSE CHANGELOG.md)
]
end
defp docs do
[
main: "AgentCoordinator",
source_ref: "v#{@version}",
source_url: @source_url,
extras: [
"README.md",
"CHANGELOG.md"
]
]
end
end