Skip to content

feat(webhook): switch local-webhook to the Python port, drop nodejs - #157

Merged
defangdevs merged 1 commit into
masterfrom
feat/webhook-python-port
Jul 30, 2026
Merged

feat(webhook): switch local-webhook to the Python port, drop nodejs#157
defangdevs merged 1 commit into
masterfrom
feat/webhook-python-port

Conversation

@defangdevs

Copy link
Copy Markdown
Owner

Companion to defangdevs/local-channels#4 (local-webhook 0.8.0: webhook.mjswebhook.py, python3 ≥ 3.9, stdlib only).

  • Pin cfg.webhook.rev/sha256 to local-channels 5d6c932, fetch webhook.py
  • webhookNodewebhookPython (${pkgs.python3}/bin/python3) in the daemon ExecStart and the agent-box-webhook wrapper
  • Drop the nodejs-slim PATH injection — the plugin's .mcp.json now runs a bare python3, which agentBaseTools already provides. This removes the box's only nodejs dependency.
  • tests/webhook.nix: peer stand-in extracts python3/webhook.py from the unit's own ExecStart (same no-drift construction as before)

Wire/state contracts are unchanged and the js/py IPC envelope interoperates in both directions (verified in the 4-way daemon/peer matrix on the local-channels side), so restart order doesn't matter during rollout.

Verified here: fetchurl pin builds against the new rev+hash; assemble-module --check passes; all 13 flake checks instantiate. x86_64 builds (incl. the webhook VM test) are on CI — this box is aarch64.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PsqGhkpjsb4kKAdVz25xKN

local-channels 0.8.0 rewrote webhook.mjs as webhook.py (single file,
stdlib only, python3 >= 3.9) — see defangdevs/local-channels#4. Wire
protocols and state formats are unchanged and the js/py IPC envelope
interoperates both ways, so daemon and session peers can restart onto
the new script in any order.

- pin rev/sha256 to local-channels 5d6c932 and fetch webhook.py
- daemon ExecStart and the agent-box-webhook wrapper run ${pkgs.python3}
- drop the nodejs-slim PATH injection: the plugin's .mcp.json now runs a
  bare `python3`, which agentBaseTools already provides — the box's only
  nodejs dependency is gone
- tests/webhook.nix: extract python3/webhook.py from ExecStart instead
  of node/webhook.mjs

Verified: fetchurl pin builds against the new rev+hash; all 13 flake
checks instantiate (x86_64 builds are CI's job — this box is aarch64);
assemble-module --check passes; the port itself was parity-tested
side by side with the JS implementation under Python 3.9.18 before the
local-channels merge (CLI diff, MCP stdio diff, 4-way daemon/peer
matrix, fd-activation emulation, real GitHub delivery replay).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsqGhkpjsb4kKAdVz25xKN
@defangdevs
defangdevs merged commit c9f6288 into master Jul 30, 2026
1 of 2 checks passed
@defangdevs
defangdevs deleted the feat/webhook-python-port branch July 30, 2026 13:32
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