Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d09da3319a | |||
| 1dc64532ff | |||
| fa4c280fa2 |
@@ -34,9 +34,6 @@ jobs:
|
||||
QUEUE_LABEL: merge-queue
|
||||
HOLD_LABEL: merge-queue-hold
|
||||
UPDATE_STYLE: merge
|
||||
# Context names: CI workflow (.gitea/workflows/ci.yml) is "Test", job is "test",
|
||||
# matrix: python 3.11/3.12/3.13 → "Test / test (3.x)".
|
||||
# The CI workflow triggers on pull_request events, so Gitea posts "(pull_request)" suffix.
|
||||
REQUIRED_CONTEXTS: >-
|
||||
Test / test (3.13) (pull_request), Test / test (3.12) (pull_request), Test / test (3.11) (pull_request)
|
||||
CI / test (pull_request)
|
||||
run: python3 .gitea/scripts/gitea-merge-queue.py
|
||||
|
||||
@@ -27,7 +27,7 @@ curl -s -X POST http://localhost:8080/workspaces/<UUID>/secrets \
|
||||
|
||||
# 3. Run the demo from any machine that can reach the platform:
|
||||
WORKSPACE_ID=<UUID> PLATFORM_URL=http://localhost:8080 \
|
||||
python3 examples/remote-agent/run.py
|
||||
python3 sdk/python/examples/remote-agent/run.py
|
||||
```
|
||||
|
||||
You should see log lines for each of the three phases, and then
|
||||
|
||||
@@ -291,3 +291,61 @@ Tests added: `test_run_loop_exits_on_stop_event`,
|
||||
`test_run_loop_respects_stop_event_between_iterations` in
|
||||
`tests/test_remote_agent.py`; `test_run_agent_loop_exits_on_stop_event`
|
||||
in `tests/test_inbound.py`.
|
||||
|
||||
---
|
||||
|
||||
## KI-010 — `[Do]: Required` blocks all merges in molecule-ai org
|
||||
|
||||
**Status:** Active blocker — org-level branch protection, requires human admin action
|
||||
**Severity:** Critical
|
||||
**Affects:** All repos in `molecule-ai` org
|
||||
|
||||
### Symptom
|
||||
Every `POST /repos/{owner}/{repo}/pulls/{n}/merge` attempt returns:
|
||||
```
|
||||
HTTP 422 — [Do]: Required
|
||||
```
|
||||
Repo-level branch protection API shows `user_can_merge: False` and `required_approvals: 1` (already satisfied by plugin-dev). All CI checks are green. The `[Do]` entity is **not** a Gitea user, **not** a team, **not** a CODEOWNERS file — it is invisible via all API endpoints.
|
||||
|
||||
### Root cause
|
||||
Org-level branch protection rule in Gitea admin panel (not visible via `/api/v1/repos/{org}/{repo}/branches/{branch}/protection`). Requires a specific named identity `[Do]` that no API token can satisfy. `devops-engineer` (AUTO_SYNC_TOKEN) bypasses this on `molecule-core` only — the rule is not applied to that repo, or the token is whitelisted there.
|
||||
|
||||
### Impact
|
||||
- 17 PRs blocked on SDK/MCP/CLI
|
||||
- 21+ PRs blocked across plugin repos
|
||||
- Merge queue automation cannot activate without admin web merge
|
||||
- `AUTO_SYNC_TOKEN` cannot merge without org-level whitelisting for SDK/MCP/CLI/plugin repos
|
||||
|
||||
### Resolution path
|
||||
1. **Immediate**: Admin web-merges the 3 workflow PRs (SDK #17, MCP #13, CLI #11) → queue activates → content PRs auto-merge
|
||||
2. **Short-term**: Add `AUTO_SYNC_TOKEN` as a bypass actor in branch protection for SDK/MCP/CLI repos, OR relax org-level rule to repo level
|
||||
3. **Plugin repos**: Same pattern — merge queue PRs created for all 21 repos (see below), admin web merge needed
|
||||
|
||||
### Plugin repo merge queue PRs (created 2026-05-14)
|
||||
All 21 `molecule-ai/molecule-ai-plugin-*` repos have new PRs adding `gitea-merge-queue.yml` + `gitea-merge-queue.py` (sourced from core #860). PR numbers by repo:
|
||||
|
||||
| Repo | PR# |
|
||||
|------|-----|
|
||||
| molecule-ai-plugin-browser-automation | #7 |
|
||||
| molecule-ai-plugin-ecc | #10 |
|
||||
| molecule-ai-plugin-gh-identity | #10 |
|
||||
| molecule-ai-plugin-molecule-audit | #12 |
|
||||
| molecule-ai-plugin-molecule-audit-trail | #8 |
|
||||
| molecule-ai-plugin-molecule-careful-bash | #11 |
|
||||
| molecule-ai-plugin-molecule-compliance | #12 |
|
||||
| molecule-ai-plugin-molecule-dev | #9 |
|
||||
| molecule-ai-plugin-molecule-freeze-scope | #11 |
|
||||
| molecule-ai-plugin-molecule-hitl | #12 |
|
||||
| molecule-ai-plugin-molecule-prompt-watchdog | #11 |
|
||||
| molecule-ai-plugin-molecule-security-scan | #12 |
|
||||
| molecule-ai-plugin-molecule-session-context | #8 |
|
||||
| molecule-ai-plugin-molecule-skill-code-review | #8 |
|
||||
| molecule-ai-plugin-molecule-skill-cron-learnings | #8 |
|
||||
| molecule-ai-plugin-molecule-skill-cross-vendor-review | #8 |
|
||||
| molecule-ai-plugin-molecule-skill-llm-judge | #8 |
|
||||
| molecule-ai-plugin-molecule-skill-update-docs | #8 |
|
||||
| molecule-ai-plugin-molecule-workflow-retro | #8 |
|
||||
| molecule-ai-plugin-molecule-workflow-triage | #9 |
|
||||
| molecule-ai-plugin-superpowers | #9 |
|
||||
|
||||
All labeled `merge-queue` and approved by sdk-lead. Need admin web merge.
|
||||
|
||||
@@ -60,7 +60,7 @@ print(f"loop exited: {terminal}")
|
||||
```
|
||||
|
||||
A runnable demo with full setup walkthrough lives at
|
||||
[`examples/remote-agent/`](https://git.moleculesai.app/Molecule-AI/molecule-sdk-python/-/tree/main/examples/remote-agent) — the runnable demo with full setup walkthrough.
|
||||
[`sdk/python/examples/remote-agent/`](../examples/remote-agent).
|
||||
|
||||
## What the SDK gives you
|
||||
|
||||
@@ -282,5 +282,5 @@ the security benefits of bearer auth until both sides upgrade.
|
||||
|
||||
- [`molecule_plugin`](../molecule_plugin) — the *other* SDK in this
|
||||
package, for plugin authors. Different audience.
|
||||
- [`examples/remote-agent/run.py`](https://git.moleculesai.app/Molecule-AI/molecule-sdk-python/-/blob/main/examples/remote-agent/run.py)
|
||||
- [`sdk/python/examples/remote-agent/run.py`](../examples/remote-agent/run.py)
|
||||
— the runnable demo that proves all of the above end-to-end.
|
||||
|
||||
@@ -20,7 +20,7 @@ Intended usage::
|
||||
env = client.pull_secrets() # decrypted secrets dict
|
||||
client.run_heartbeat_loop() # background heartbeat + state-poll
|
||||
|
||||
See ``examples/remote-agent/`` for a runnable demo.
|
||||
See ``sdk/python/examples/remote-agent/`` for a runnable demo.
|
||||
|
||||
Design notes:
|
||||
* **No async.** The SDK uses blocking ``requests`` so a remote agent author
|
||||
|
||||
@@ -11,19 +11,10 @@ a Phase 30 endpoint:
|
||||
* :py:meth:`run_heartbeat_loop` — drives heartbeat + state-poll on a timer,
|
||||
returns when the platform reports the workspace paused or deleted.
|
||||
|
||||
The client also exposes two inbound delivery paths for handling platform-initiated
|
||||
A2A messages:
|
||||
|
||||
* **Push mode** — :class:`molecule_agent.a2a_server.A2AServer` hosts an HTTP server
|
||||
in a background thread; platform pushes inbound A2A as HTTP requests. Use when the
|
||||
agent has a publicly reachable URL (cloud VM, ngrok tunnel, etc.).
|
||||
* **Poll mode** — :class:`molecule_agent.inbound.PollDelivery` polls
|
||||
``GET /workspaces/:id/activity`` on a configurable interval; no public URL required.
|
||||
The default when no explicit delivery is passed to :py:meth:`run_agent_loop`.
|
||||
|
||||
Both feed the same :py:class:`molecule_agent.inbound.MessageHandler` callback.
|
||||
Reply routing (``/notify`` for canvas users, ``/a2a`` for peer agents) is handled
|
||||
automatically by :py:meth:`reply`.
|
||||
No inbound A2A server is bundled here yet — that requires hosting an HTTP
|
||||
endpoint the platform's proxy can reach, which is network-dependent.
|
||||
Use :class:`molecule_agent.a2a_server.A2AServer` to add inbound A2A support.
|
||||
See that module for usage and the Phase 30.8b contract.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Example: a minimal plugin that's installable on Claude Code and DeepAgents
|
||||
├── claude_code.py # `from molecule_plugin import AgentskillsAdaptor as Adaptor`
|
||||
└── deepagents.py # same one-liner
|
||||
|
||||
Full docs + cookiecutter template: see the repo root ``README.md``.
|
||||
Full docs + cookiecutter template: see ``sdk/python/README.md``.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
Reference in New Issue
Block a user