Commit Graph

3 Commits

Author SHA1 Message Date
cdf0892b2e chore(ci): pin artifact actions to @v3 for Gitea act_runner compatibility (internal#46)
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
CI / test (3.12) (pull_request) Failing after 11s
2 uses pinned in .github/workflows/publish.yml (1 upload at line 52, 1
download at line 64). v4 relies on a runtime API shape Gitea's act_runner
v0.6.x doesn't fully support; v3 works end-to-end. YAML parse green.

Sister PRs in molecule-controlplane (#18) and molecule-core (#18). Per
internal#46 Phase 2 audit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 01:11:34 -07:00
Hongming Wang
dba5970177 chore(ci): tag-triggered PyPI publish via OIDC trusted-publisher
Tag-on-push (`v0.1.0` shape) builds the sdist+wheel, smoke-imports the
console-script entry point from a fresh venv to catch packaging
regressions, then uploads to PyPI via trusted publisher OIDC — no
API token in repo secrets.

Includes a tag-vs-pyproject version-match guard: aborts the publish
if the tag doesn't match `pyproject.toml`'s `version`. Cheap defense
against the failure mode where the tag advances but pyproject doesn't,
which silently re-publishes the same wheel under a new tag.

README's "Releasing" section walks through the one-time PyPI trusted-
publisher registration the operator must do once before the first
tagged push.

After this lands and the PyPI registration is complete, the codex tab
in the External Connect modal can switch from
  pip install 'git+https://github.com/Molecule-AI/codex-channel-molecule.git'
to
  pip install codex-channel-molecule

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 18:37:17 -07:00
Hongming Wang
d6eb78dcee feat: initial bridge daemon
codex-channel-molecule is the codex-side counterpart to
hermes-channel-molecule. It long-polls the molecule platform inbox via
molecule_runtime.a2a_tools.tool_wait_for_message, runs `codex exec
--resume <session>` per inbound message, captures the assistant reply
from stdout, and routes it back through send_message_to_user (canvas
chat) or delegate_task (peer agent), then acks the inbox row.

Per chat thread (one canvas-user thread or one peer-workspace thread)
gets its own codex session_id, persisted to disk so daemon restarts
keep conversation context. Reply-routing failures skip the inbox_pop
ack so the platform's at-least-once delivery re-surfaces the row on
the next poll.

This daemon is the operator-unblock until openai/codex#17543 lands —
once codex itself accepts MCP custom notifications as Op::UserInput
through the wired-in MCP server, this daemon becomes redundant. The
README's deprecation-path section calls that out so future operators
know when to switch off.

Tests cover the dispatch loop with fake tools (8 tests asserting
exact contracts: canvas vs peer routing, session continuity,
persistence across restarts, timeout sentinel handling, at-least-once
on reply failure, exit-code surfacing, A2A multipart text). The
codex_runner tests are real-subprocess (fake codex script spawned via
asyncio.create_subprocess_exec) so the boot path matches production —
no in-process mocking of the spawn boundary.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 18:09:09 -07:00