Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
208 lines (186 loc) · 8.6 KB
/
Copy pathpyproject.toml
File metadata and controls
208 lines (186 loc) · 8.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "agent-comms"
dynamic = ["version"]
description = "Declaration-owned multi-agent coordination for OpenHCS: threads, JSONL message bus, shared ledger, and ACP server"
authors = [{ name = "Tristan Simas", email = "tristan.simas@mail.mcgill.ca" }]
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.14,<3.15"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Communications",
]
keywords = ["agents", "coordination", "message-bus", "acp", "multi-agent"]
dependencies = [
"aiohttp>=3.14",
"agent-client-protocol>=0.8",
"immutables",
"metaclass-registry @ git+https://github.com/OpenHCSDev/metaclass-registry@main",
"nominal-refactor-advisor @ git+https://github.com/OpenHCSDev/NominalRefactorAdvisor@main",
"packaging>=24",
"polystore @ git+https://github.com/OpenHCSDev/polystore@main",
"pydantic>=2.13",
"pytest>=7.0",
"python-introspect @ git+https://github.com/OpenHCSDev/python-introspect@main",
]
[project.optional-dependencies]
dev = [
"pytest-cov>=4.0",
"pytest-asyncio>=0.23",
"pytest-xdist>=3.6",
"pytest-timeout>=2.3",
"black==26.5.1",
"ruff==0.16.0",
"mypy==2.3.0",
"uv==0.13.1",
"tomli-w==1.2.0",
]
[project.urls]
Homepage = "https://github.com/OpenHCSDev/agent-comms"
Repository = "https://github.com/OpenHCSDev/agent-comms"
Issues = "https://github.com/OpenHCSDev/agent-comms/issues"
[project.scripts]
agent-comms = "agent_comms.cli:main"
agent-comms-practice-fixture = "agent_comms.practice_fixture:main"
agent-comms-resources = "agent_comms.resources.cli:main"
agent-comms-acp = "agent_comms.execution.acp:main"
agent-comms-agent = "agent_comms.execution.worker.__main__:main"
agent-comms-nk-foreground = "agent_comms.execution.nk_foreground:main"
pi-comms-native = "agent_comms.execution.native_pi:main"
agent-comms-claude-bridge = "agent_comms.cli_bridges.claude:main"
agent-comms-antigravity-bridge = "agent_comms.cli_bridges.antigravity:main"
agent-comms-antigravity-hook = "agent_comms_hooks.antigravity:main"
agent-comms-inbox-watch = "agent_comms_hooks.inbox_watch:main"
agent-comms-model-agent = "agent_comms.cli_bridges.model_agent_client:main"
agent-comms-cloud-session = "agent_comms.cli_bridges.cloud_session:main"
agent-comms-codex-bridge = "agent_comms.cli_bridges.codex:main"
agent-comms-opencode-bridge = "agent_comms.cli_bridges.opencode:main"
agent-comms-team = "agent_comms.team.cli:main"
agent-comms-integrate = "agent_comms.projects.integration:main"
agent-comms-team-skill = "agent_comms_hooks.watch:SkillText.main"
agent-comms-team-reread = "agent_comms_hooks.reread:ReminderProgram.main"
agent-comms-prime = "agent_comms.cli_bridges.hook_prime:main"
agent-comms-team-deferral-guard = "agent_comms_hooks.deferral:DeferralGuard.main"
agent-comms-team-bounded-waits = "agent_comms_hooks.bounded_waits:BoundedWaits.main"
agent-comms-read-gate = "agent_comms_hooks.read_gate:ReadGateProgram.main"
agent-comms-hooks = "agent_comms_hooks.hook_switch:main"
agent-comms-queue-bypass-guard = "agent_comms_hooks.queue_bypass:QueueBypassGuard.main"
agent-comms-claude-session-started = "agent_comms.cli_bridges.hook_session:SessionHook.main"
agent-comms-claude-session-ended = "agent_comms_hooks.session:SessionEnded.main"
agent-comms-claude-subagent-started = "agent_comms_hooks.forks:SubagentStartProgram.main"
agent-comms-claude-subagent-stopped = "agent_comms_hooks.forks:SubagentStopProgram.main"
agent-comms-connector = "agent_comms.transport.connector:main"
opencode-comms = "agent_comms.cli_bridges.opencode_launch:main"
claude-comms = "agent_comms.cli_bridges.claude_launch:main"
[project.entry-points."agent_comms.writer_owned_stores"]
bridge-delivery = "agent_comms.cli_bridges.shared"
connector-credentials = "agent_comms.transport.connector_store"
[tool.hatch.build.hooks.custom]
path = "hatch_build.py"
require-runtime-dependencies = true
[tool.hatch.build.targets.wheel]
packages = ["src/agent_comms", "src/agent_comms_hooks"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel.force-include]
"AGENTS.md" = "agent_comms/_native/AGENTS.md"
"stack/pi-native.sha256" = "agent_comms/_native/pi-native.sha256"
[tool.hatch.build.targets.sdist]
include = [
"src", "tests", "extensions", "README.md", "LICENSE", "hatch_build.py",
"AGENTS.md", "stack/AGENTS.md",
"stack/pi-native.sha256",
]
[tool.hatch.version]
path = "src/agent_comms/__init__.py"
[tool.uv]
cache-keys = [{ file = "pyproject.toml" }, { git = { commit = true } }]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = [".", "src", "tools"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
# A hung test fails by name instead of holding the whole job.
timeout = 60
# A test blocked inside a C call (SQLite, flock) never runs a SIGALRM handler, so the signal
# method never fires; the thread method dumps every stack and ends the worker, and xdist
# replaces it and runs the rest of its queue.
timeout_method = "thread"
# An interpreter missing a plugin refuses to start instead of silently ignoring `timeout`.
required_plugins = ["pytest-timeout>=2.3", "pytest-xdist>=3.6", "pytest-asyncio>=0.23"]
markers = ["refactor_guard: permanent architecture guards selected by the required debt check"]
# A test that builds a coroutine and drops it never ran the setup it names, and the only
# notice is a warning printed beside the failure it caused. Fail on the warning instead.
filterwarnings = ["error:coroutine .* was never awaited:RuntimeWarning"]
# /tmp is RAM: keep only the last run's failing tests' directories.
tmp_path_retention_policy = "failed"
tmp_path_retention_count = 1
[tool.black]
line-length = 100
[tool.ruff]
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP", "B", "SIM", "TID252"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"agent_comms.storage.store_files.ExclusiveLock",
"agent_comms.execution.imported_messages.ImportLimits",
"agent_comms.execution.transcript_sources.LatestPage",
"agent_comms.execution.transcript_sources.AtFrontier",
"agent_comms.transcript.transcripts.LivePageSource",
"agent_comms.messaging.notification_evidence.FirstRecipient",
"agent_comms.messaging.notification_evidence.RecipientLimit",
]
[tool.mypy]
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = ["xdist.*"]
follow_untyped_imports = true
[tool.nominal-refactor-advisor]
# The class whose construction builds each service from the services it hands it: those
# constructor arguments are the service layering, and code a service loads reads nothing
# only a service built on it loads.
composition-roots = ["agent_comms.comms:Comms"]
# Rows and files nothing else can rebuild: a field-shape move on a class reaching one of
# these refuses unless the plan carries the stored values.
durable-bases = [
"agent_comms.storage.typed_table:DurableTables",
"agent_comms.storage.locked_store:DurableFile",
# Saved Pi session files: every entry Pi or Core wrote stays for the session's life.
"agent_comms.execution.native_entries:RecordedEntry",
]
# Functions that build a class handed to them only by field name, or never build it: a
# class passed to one keeps its constructions when its fields become keyword-only.
keyword-binders = [
# A class encodes as its declared name; a record decodes through construct(**values).
"agent_comms.nominal.field_codec:FieldCodec.encode",
"agent_comms.nominal.field_codec:FieldCodec.decode",
# Query filters are encoded by their declared columns into bound SQL parameters.
"agent_comms.storage.typed_table:TypedTable.select",
]
# A family member spells itself by its declared_name, else by declared_words applied to
# its class name minus its root's affix: NRA calls the rule instead of restating it.
derived-spellings = [
{ family = "agent_comms.nominal.declared_family:DeclaredFamily", rule = "agent_comms.nominal.declared_family:declared_words", affix = "affix", spelling = "declared_name" },
]
# Stdlib-only fast-path hook: importing agent_comms at module top level runs Core on every tool call.
forbidden-imports = [
{ from = "agent_comms_hooks.antigravity", to = ["agent_comms"] },
]