diff --git a/.codex/environments/environment.toml b/.codex/environments/environment.toml new file mode 100644 index 0000000..6dbce5b --- /dev/null +++ b/.codex/environments/environment.toml @@ -0,0 +1,41 @@ +# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY +version = 1 +name = "mp-ai-module-controller" + +[setup] +script = "scripts/codex-setup.sh" + +[[actions]] +name = "Build" +icon = "tool" +command = "cargo build" + +[[actions]] +name = "Test" +icon = "tool" +command = "cargo test" + +[[actions]] +name = "Generate Dictionary" +icon = "tool" +command = "cargo run -- dictionary generate" + +[[actions]] +name = "Precommit Check" +icon = "tool" +command = "scripts/precommit-check.sh" + +[[actions]] +name = "Run Logger" +icon = "run" +command = "cargo run -- run logger --payload '{\"message\":\"hello from codex environment\"}'" + +[[actions]] +name = "Query Logger" +icon = "run" +command = "cargo run -- query \"log hello from codex\"" + +[[actions]] +name = "Serve Llama" +icon = "run" +command = "cargo run -- serve" diff --git a/.gitignore b/.gitignore index 1791b5a..07fd07f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /dictionary/actions.jsonl /dictionary/actions.index.json *.log +.DS_Store diff --git a/AGENTS.md b/AGENTS.md index e5f8f4e..41dfd8e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,7 @@ - Codex setup: `scripts/codex-setup.sh` - Codex logger smoke test: `scripts/codex-run-logger.sh` - Precommit/CI check: `scripts/precommit-check.sh` +- Codex environment: `.codex/environments/environment.toml` ## Environment @@ -55,6 +56,7 @@ Use `.env` for local values and keep it out of git. Update `.env.example`, `READ ## CI And Hooks +- Codex environment actions live at `.codex/environments/environment.toml`. - Gitea Actions workflow lives at `.gitea/workflows/ci.yml`. - Woodpecker workflow lives at `.woodpecker.yml`. - The committed pre-commit hook lives at `.githooks/pre-commit`. diff --git a/README.md b/README.md index b911b61..83aed3d 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ The first registered script is `logger`. It writes JSONL records to `logs/contro The project includes: +- `.codex/environments/environment.toml` for Codex setup and run actions. - `.gitea/workflows/ci.yml` for Gitea Actions. - `.woodpecker.yml` for Woodpecker. - `.githooks/pre-commit` for local pre-commit checks. diff --git a/llm.txt b/llm.txt index f3ce65d..2a502bd 100644 --- a/llm.txt +++ b/llm.txt @@ -26,6 +26,7 @@ Commands: - `scripts/codex-run-logger.sh` - `scripts/precommit-check.sh` - `git config core.hooksPath .githooks` +- `.codex/environments/environment.toml` Environment: @@ -38,4 +39,6 @@ Environment: The LLM must return compact JSON like `{"action_id":"logger","payload":{"message":"hello"}}`. The runtime only executes exact `action_id` matches from `dictionary/actions.index.json`; aliases are not executable. Invalid or unknown outputs are rejected without running anything. +Codex environment: `.codex/environments/environment.toml` defines setup plus Build, Test, Generate Dictionary, Precommit Check, Run Logger, Query Logger, and Serve Llama actions. + CI and hooks: `.gitea/workflows/ci.yml`, `.woodpecker.yml`, and `.githooks/pre-commit` all use `scripts/precommit-check.sh` to verify formatting, tests, and dictionary generation. diff --git a/manifest.llm.json b/manifest.llm.json index 6419428..9690e31 100644 --- a/manifest.llm.json +++ b/manifest.llm.json @@ -11,7 +11,8 @@ "dictionary_generator": "src/dictionary.rs", "llm_client": "src/llm.rs", "dispatcher": "src/dispatcher.rs", - "logger_script": "src/scripts/logger.rs" + "logger_script": "src/scripts/logger.rs", + "codex_environment": ".codex/environments/environment.toml" }, "commands": { "build": "cargo build", @@ -108,6 +109,7 @@ "dictionary/actions.index.json" ], "ci": { + "codex_environment": ".codex/environments/environment.toml", "gitea_actions": ".gitea/workflows/ci.yml", "woodpecker": ".woodpecker.yml", "precommit_hook": ".githooks/pre-commit",