Skip to content

feat(messages): add control lifecycle contracts - #25

Open
TomCC7 wants to merge 2 commits into
mainfrom
feat/control-contracts-generated
Open

feat(messages): add control lifecycle contracts#25
TomCC7 wants to merge 2 commits into
mainfrom
feat/control-contracts-generated

Conversation

@TomCC7

@TomCC7 TomCC7 commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

  • add generated dimos_core_msgs.ModuleReadiness
  • add scalar control, lifecycle, and typed description contracts under dimos_control_msgs
  • generate Python, C++, C#, Java, Lua, TypeScript, and Rust bindings
  • preserve handwritten Rust/TypeScript package files during regeneration
  • bump the package to 0.1.4

The generator-preservation commit is the same commit already reviewed on #24; it is included here because it has not landed on main and clean generation otherwise deletes checked-in files.

Validation

  • nix develop --command ./generate.sh
  • repeat generation produces no diff
  • python -m unittest tests/test_control_contracts.py -v
  • ruff check generated/python_lcm_msgs/fix_imports.py tests/test_control_contracts.py
  • python -m build
  • install built wheel in a clean venv and import/round-trip the new packages

Dependency for dimensionalOS/dimos#3409 PR3.

leshy and others added 2 commits September 3, 2026 19:08
Both the Rust and TypeScript steps `rm -rf` their whole output directory
before regenerating, but the generators only own part of what lives
there. Every run destroyed generated/rust_lcm_msgs/{.gitignore,tests/}
and generated/ts_lcm_msgs/{mod.ts,deno.json}, so anyone running
generate.sh got four spurious deletions in their diff.

Clear only what each generator actually rewrites: src/ for the Rust
crate (it owns src/ and Cargo.toml), and the per-package directories for
TypeScript (the root files are hand-written in tools/ts/msgs/). The copy
into tools/ts/msgs/generated now takes the package directories
explicitly, which is what it effectively copied before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants