Commit Graph

1225 Commits

Author SHA1 Message Date
molecule-ai[bot]
caf15c1255 docs(blog): add Cloudflare Artifacts + Molecule AI integration post 2026-04-21 01:57:03 +00:00
molecule-ai[bot]
eae762ec08 fix(ci): move changes job off self-hosted runner + add workflow concurrency
Two changes to relieve macOS arm64 runner contention:

1. `changes` job: runs on `ubuntu-latest` instead of
   `[self-hosted, macos, arm64]`. This job does a plain `git diff`
   — it has zero macOS dependencies. Moving it off the runner frees
   the slot immediately on every workflow trigger.

2. Add workflow-level concurrency to `ci.yml`:
   `concurrency: group: ci-${{ github.ref }}; cancel-in-progress: true`

   Without this, every new push to a PR or main queues a full new
   workflow run, each competing for the same single runner. With
   `cancel-in-progress: true`, stale in-flight CI runs are cancelled
   when a newer commit arrives — the runner always runs the latest
   state, not a backlog of old ones.

Context: the self-hosted macOS arm64 runner is shared by ci.yml,
e2e-api.yml, canary-verify.yml, and publish-*.yml. The combination of
(1) the `changes` job holding the runner during `fetch-depth: 0`
checkout on every trigger, and (2) no workflow-level cancellation
caused 100+ queued runs with 0 in-progress.

Follow-up candidates (need verification before changing):
- platform-build: Go build may work on ubuntu-latest (no macOS deps)
- canvas-build: Next.js build may work on ubuntu-latest
- python-lint: needs `setup-python` instead of Homebrew Python

Co-authored-by: Molecule AI Infra-SRE <infra-sre@agents.moleculesai.app>
2026-04-21 01:44:27 +00:00
molecule-ai[bot]
7faaf1934b docs(marketing): add Discord adapter coordination + org-API-keys announcement copy 2026-04-21 01:37:22 +00:00
molecule-ai[bot]
7343967b7f docs(marketing): add Discord adapter coordination + org-API-keys announcement copy 2026-04-21 01:37:21 +00:00
molecule-ai[bot]
2c14f63508 docs(blog): fix Getting Started section — browser MCP is custom server not built-in 2026-04-21 01:37:02 +00:00
molecule-ai[bot]
d3bf4e145e docs(marketing): add Discord adapter launch visual assets + branding 2026-04-21 01:14:25 +00:00
Hongming Wang
f65cd4fe48 Merge pull request #1197 from Molecule-AI/fix/review-nits-post-bootstrap-watcher
chore(canvas): review nits on ConsoleModal + Peers empty state
2026-04-20 18:03:36 -07:00
Hongming Wang
c033f3b051 chore(canvas): review nits on ConsoleModal + Peers empty state
Post-review cleanup for the #1178 / #1189 bootstrap-watcher flow:

- ConsoleModal status-code matching uses \b regex anchors instead of
  raw substrings. Before, any error message containing "501" inside
  a longer digit run ("15012") would false-match into the self-hosted
  branch. Unlikely in practice but cheap to tighten.

- Peers empty-state copy now explains WHY the list is empty on
  offline / failed / provisioning workspaces instead of rendering the
  same "No reachable peers" text used for healthy workspaces with
  zero siblings. Online workspaces unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 18:02:22 -07:00
9cc48a99fb docs: add Phase 30 launch plan, SEO keywords, and Cognee research
- Phase 30 launch plan (chrome-devtools-mcp-seo-brief.md, blog post)
- SEO keyword brief (keywords.md with P0/P1 locked keywords)
- Cognee workspace isolation eval + architecture deep-dive

Co-Authored-By: PM <pm@agents.moleculesai.app>
2026-04-21 01:00:56 +00:00
molecule-ai[bot]
a5a495c804 Merge pull request #1032 from Molecule-AI/fix/scheduler-advance-next-run-1029
fix(scheduler): advance next_run_at on panic to prevent stuck schedules (#1029)
2026-04-21 00:59:32 +00:00
molecule-ai[bot]
7f2d71e392 test merge attempt
Co-authored-by: Molecule AI CP-BE <cp-be@agents.moleculesai.app>
2026-04-21 00:57:43 +00:00
molecule-ai[bot]
35ccda1091 fix(security): replace err.Error() with generic messages in handler responses (#1193)
Replace all c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
calls across 22 handler files with context-appropriate generic messages
to prevent internal error strings (DB details, validation messages,
file paths) leaking into API responses.

Pattern established:
- ShouldBindJSON failures → "invalid request body" (or "invalid delegation request")
- Validation failures → "invalid workspace ID", "invalid path", etc.
- Server-side errors still logged, only generic message returned to client

References: Security finding from Audit #125 (Stripe key leak via err.Error())

Co-authored-by: Molecule AI Fullstack (floater) <fullstack-floater@agents.moleculesai.app>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:56:03 +00:00
rabbitblood
1c58bae7c5 test: trigger CI with file change 2026-04-21 00:48:52 +00:00
rabbitblood
f134ea1b6c ci: retrigger CI for test fix 2026-04-21 00:48:52 +00:00
rabbitblood
74f36e6cec fix(test): align scheduler tests with #969 deferral loop and #795 empty-run tracking
- TestRecordSkipped_AdvancesNextRunAt: call recordSkipped directly instead
  of going through fireSchedule, which now has a 2-min deferral loop (#969)
  that makes sqlmock-based end-to-end testing impractical.
- TestFireSchedule_NormalSuccess_AdvancesNextRunAt: add missing expectation
  for the consecutive_empty_runs reset query (#795) that fires on non-empty
  successful responses.
- TestFireSchedule_ComputeNextRunError: same consecutive_empty_runs fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 00:48:52 +00:00
rabbitblood
ad0b870182 test: verify next_run_at advances on panic recovery (#1029)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 00:48:52 +00:00
rabbitblood
8ea04d62bb test: add cascade schedule disable tests for #1027
Add production fix and three new test cases verifying that workspace
deletion cascade-disables all workspace_schedules for the deleted
workspace and its descendants, preventing zombie schedule firings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 00:47:55 +00:00
rabbitblood
c0bc0df439 fix(scheduler): advance next_run_at on panic recovery to prevent stuck schedules (#1029)
When fireSchedule panics before reaching the next_run_at UPDATE,
the deferred recover catches the panic but never advances next_run_at,
leaving it stuck in the past forever. The schedule then fires every
tick (30s) in an infinite retry loop.

Add next_run_at advancement to both panic recovery defers (the
per-goroutine one in tick() and the inner one in fireSchedule()) so
the schedule always moves forward regardless of how the fire exits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 00:47:55 +00:00
Hongming Wang
23788f5cba Merge pull request #1190 from Molecule-AI/staging
staging → main: silence peers 401 noise
2026-04-20 17:39:02 -07:00
Hongming Wang
421d220106 Merge pull request #1189 from Molecule-AI/fix/peers-fetch-online-only
fix(canvas): skip /registry/:id/peers 401 noise on non-online workspaces
2026-04-20 17:38:47 -07:00
Hongming Wang
3b339d13e6 fix(canvas): skip /registry/:id/peers fetch when workspace not online
The peers endpoint requires a workspace-scoped bearer token (see
validateDiscoveryCaller in handlers/discovery.go — designed for
agent-to-agent calls). The canvas session doesn't hold that token, so
every Details-tab open for a provisioning / failed / offline workspace
fired a 401 that cluttered devtools and lit up the error banner even
though the real UX here is "no peers — the workspace hasn't booted."

Gate the fetch on status ∈ {online, degraded} and render an empty
Peers list for everything else.

Follow-up: give the canvas a way to see peers for any workspace (admin
session should be enough). Tracked separately — this fix just quiets
the noise on the common case.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 17:38:25 -07:00
Molecule AI Community Manager
b8305fddd3 docs(marketing): add posting guide for Discord adapter announcement
Document where to post (Reddit r/LocalLlama, r/ML, dev.to), required
credentials, and current status. All committed to staging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:38:07 +00:00
Molecule AI Community Manager
fcf6883aa1 docs(marketing): add Discord adapter announcement draft (issue #1183)
Announcement copy for PR #656 — Discord adapter shipped.
Platforms: Discord, Reddit r/LocalLLama, dev.to.
Coordination note: thread #1182 timing TBD — flag for Social Media Brand.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
e30625628f docs: update social-channels.md — Discord adapter shipped (PR #656)
- Mark discord as  Implemented (was: Planned)
- Add Discord Setup section with webhook config, Canvas steps, API example
- Document slash command inbound + webhook outbound architecture

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
128e5ade79 docs(marketing): add SVG visual assets for both campaign social copies
Chrome DevTools MCP:
- mcp-bridge-diagram.svg: AI Agent → MCP → CDP → Chrome architecture
- comparison-table-card.svg: 3-approach comparison with cost/cred isolation

Fly.io Deploy Anywhere:
- backend-comparison-card.svg: 3 backend comparison with env vars

Social copy docs updated to reference generated assets.
Social Media Brand can use SVGs directly or screenshot for PNG export.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
b68952d8eb docs(marketing): add social copy for Fly.io deploy-anywhere blog post
Draft X thread (5 posts) + LinkedIn post + visual recs for the
2026-04-17 published post. Ready for Social Media Brand review.
Coordination note: avoid same-day publish as Chrome DevTools MCP post.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
feafb4ae8b docs(marketing): update brief with final status and PMM feedback log
All actions 1-5 complete. Action 6 outreach targets prepped.
Status updated: Marketing Lead review required before outreach.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
08057cf59b docs(marketing): add backlink outreach target list for Chrome DevTools MCP campaign
Action 6 prep — outreach target list (Tier 1-3), email template,
priority order, monitoring plan. HOLD flagged prominently: do not
outreach until post is live on main + reviewed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
07464b7b6d docs(marketing): add social copy draft for Chrome DevTools MCP blog post
Action 2 (social copy) drafted for Social Media Brand review:
- X/Twitter 5-post thread with hook → demo → use cases → CTA
- LinkedIn single post with competitive framing
- Visual asset recommendations (4 types)
- Publishing schedule + UTM tags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
9b4b357c8d docs(marketing): add analytics tracking blueprint for Chrome DevTools MCP blog post
Actions 3-5 complete:
- Internal linking audit done: MCP spec, CDP docs, cross-links added
- Sitemap: no sitemap.xml in repo (auto-generated by build)
- Analytics blueprint: GA4 events, PostHog funnels, UTM params, ranking signals

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
6486ca182f docs: add internal links for Chrome DevTools MCP blog post
Internal linking (Action 3):
- Chrome DevTools MCP post: added MCP spec + CDP docs as external links
- Chrome DevTools MCP post: cross-linked to fly-machines-provisioner tutorial + deploy-anywhere post
- docs/index.md: added blog section with both posts
- deploy-anywhere post: added "See also" cross-link to new browser post

No sitemap.xml found — likely auto-generated by site build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
daf7c46917 docs(blog): revise Chrome DevTools MCP post with PMM feedback
PMM feedback applied:
- Stronger outcome-first headline: "Give Your AI Agent a Real Browser"
- MCP defined within first 100 words for non-MCP-literate readers
- Infrastructure comparison table added (custom, SaaS, Molecule AI)
- "Zero-config" claim now proven with concrete workspace YAML config
- LangChain/CrewAI differentiation added to comparison section
- n8n contrast added to use cases: agents reason, workflows are manually wired
- Meta description and tags updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
Molecule AI Community Manager
6033e392f0 docs(marketing): add Chrome DevTools MCP SEO blog post
- Brief: keywords, audience, outline, SEO requirements (Content Marketer authored)
- Blog post: "How to Add Browser Automation to AI Agents with MCP"
  - CDP + MCP bridge explanation
  - Full Python code example (end-to-end competitor research agent)
  - Chrome remote debugging setup guide
  - Minimal MCP-to-CDP server implementation
  - Real-world use cases (4 production scenarios)
  - CTAs linking to Molecule AI docs + GitHub

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:37:17 +00:00
molecule-ai[bot]
9842564b90 fix(security): truncate oversized memory content to prevent storage DoS (CWE-400) (#1167)
CP-QA approved. seedInitialMemories() now truncates mem.Content at 100,000 bytes before INSERT. Oversized content is logged with byte count before/after so operators can detect truncation. Fixes #1066 (CWE-400). NOTE: no unit tests in this commit — follow-up issue recommended.
2026-04-21 00:36:29 +00:00
molecule-ai[bot]
0b1fb56046 fix(scheduler): advance next_run_at on panic to prevent infinite DoS loop (#1029) (#1166)
CP-QA approved. Panic recovery in fireSchedule now advances next_run_at via ComputeNextRun + ExecContext, preventing a panicking cron from indefinitely starving all other schedules. 3 new tests: TestPanicRecovery_AdvancesNextRunAt, TestFireSchedule_NormalSuccess, TestRecordSkipped_AdvancesNextRunAt. Fixes #1029.
2026-04-21 00:34:13 +00:00
Hongming Wang
64b17e2778 Merge pull request #1187 from Molecule-AI/staging
staging → main: canvas error logs + console modal (PR #1178)
2026-04-20 17:33:26 -07:00
Hongming Wang
df756177cf Merge pull request #1178 from Molecule-AI/feat/failed-workspace-error-logs
feat(canvas): show last_sample_error + EC2 console output on failed workspaces
2026-04-20 17:32:43 -07:00
Hongming Wang
6f22b40ee0 Merge remote-tracking branch 'origin/staging' into feat/failed-workspace-error-logs 2026-04-20 17:32:24 -07:00
molecule-ai[bot]
4b1851a038 fix(security): redactSecrets on admin memories export/import (#1131, #1132) (#1153)
Security fixes for the memory backup/restore endpoints merged in PR #1051.

## F1084 / #1131: Memory export exposes all workspaces

GET /admin/memories/export now applies redactSecrets() to each content
field before including it in the JSON response. Pre-SAFE-T1201 memories
(stored before redactSecrets was mandatory on writes) no longer leak
credential patterns in the admin export.

## F1085 / #1132: Memory import does not call redactSecrets

POST /admin/memories/import now calls redactSecrets() on content before
BOTH the deduplication check and the INSERT. This ensures:

- Imported memories with embedded credentials cannot land unredacted in
  agent_memories (SAFE-T1201 / #838 parity with the commit_memory path).
- Dedup is performed against the redacted value so two backups with
  the same original secret both get [REDACTED:*] as their content and
  are correctly treated as duplicates.

## New tests

admin_memories_test.go: 6 tests covering redactSecrets parity on
both Export and Import endpoints.

Closes #1131.
Closes #1132.

Co-authored-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
2026-04-21 00:32:00 +00:00
Hongming Wang
e282810b97 Merge pull request #1185 from Molecule-AI/staging
staging → main: bootstrap-failed + console endpoints (PR #1168)
2026-04-20 17:31:57 -07:00
Hongming Wang
65803d6629 Merge pull request #1168 from Molecule-AI/feat/bootstrap-failed-and-console-proxy
feat(platform): bootstrap-failed + console endpoints for CP watcher
2026-04-20 17:31:32 -07:00
Hongming Wang
c1593dd328 Merge remote-tracking branch 'origin/staging' into feat/bootstrap-failed-and-console-proxy
# Conflicts:
#	workspace-server/internal/handlers/admin_memories_test.go
2026-04-20 17:31:16 -07:00
molecule-ai[bot]
59490efde0 Merge pull request #1184 from Molecule-AI/main
chore: sync staging with main
2026-04-21 00:27:04 +00:00
molecule-ai[bot]
9b4b9e70ef Merge pull request #1181 from Molecule-AI/staging
chore: promote staging to main — SSRF, IDOR, redactSecrets, USER directive
2026-04-21 00:26:07 +00:00
molecule-ai[bot]
c958f87028 Merge pull request #1154 from Molecule-AI/fix/ssrf-url-validate-redactSecrets-admin-memories
fix(security): SSRF URL validation + admin memories redactSecrets (#1130, #1131, #1132)
2026-04-21 00:25:36 +00:00
Hongming Wang
4641151b09 Merge remote-tracking branch 'origin/staging' into feat/bootstrap-failed-and-console-proxy
# Conflicts:
#	workspace-server/internal/router/router.go
2026-04-20 17:25:24 -07:00
70d47e2730 fix(security): SSRF URL validation (#1130) + redactSecrets on memory admin endpoints (#1131, #1132)
URLs returned from DB and Redis cache (db.GetCachedURL, workspaces.url column)
are now validated via validateAgentURL() before any HTTP request is made:

- mcpResolveURL (mcp.go): added validateAgentURL() calls on all three return
  paths (internal cache, Redis cache, DB fallback).
- resolveAgentURL (a2a_proxy.go): added validateAgentURL() call before
  returning agentURL to the A2A dispatcher.

validateAgentURL() was extended (registry.go) to resolve DNS hostnames and
check each returned IP against the blocklist (private ranges, loopback,
cloud-metadata 169.254.0.0/16). "localhost" is allowed by name for local dev.

GET /admin/memories/export now applies redactSecrets() to each content field
before including it in the JSON response. Pre-SAFE-T1201 memories (stored
before redactSecrets was mandatory on writes) no longer leak credentials.

POST /admin/memories/import now calls redactSecrets() on content before both
the deduplication check and the INSERT. Imported memories with embedded
credentials cannot bypass SAFE-T1201 (#838).

- admin_memories.go: GET /admin/memories/export + POST /admin/memories/import
  handler (from PR #1051, with security fixes applied).
- admin_memories_test.go: 6 tests covering redactSecrets parity on both endpoints.

- registry_test.go: added DNS-lookup test cases for validateAgentURL (F1083).
  "localhost" allowed by name (preserves existing test); nxdomain blocked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:24:02 +00:00
c0a1113a6e fix(mcp): correct duplicate-line syntax and rebase redactSecrets to 2-arg
- Remove duplicate-line ExecContext call that caused syntax error at mcp.go:784
- Update redactSecrets signature from 1-arg to 2-arg (workspaceID, content)
  to match the canonical form established in PR #1017
- Update toolCommitMemory call site to use 2-arg form
- Add reserved workspaceID param note in docstring for future audit logging

Fixes PR #1036 compile-blocking issues (Platform Go job).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 00:23:40 +00:00
molecule-ai[bot]
96fc93228c docs(blog): Phase 30 Remote Workspaces — fleet visibility + per-workspace bearer tokens (#1157)
Squash-merge: Phase 30 Remote Workspaces blog. Acceptance: published on molecule-core.
2026-04-21 00:23:30 +00:00
Hongming Wang
48900e34b0 feat(canvas): show last_sample_error + EC2 console output on failed workspaces
Part 3 of 3 for the "fail fast + comprehensive logs" UX. Platform PR
#1168 and controlplane #181 ship the server-side; this PR surfaces the
data in the canvas.

Two changes:

1. DetailsTab renders `last_sample_error` in a dedicated Error section
   when the workspace is failed (or degraded with an error). Before,
   the only trace of why a workspace failed was a generic banner —
   users had to click "View Logs", which opened the terminal tab (the
   post-boot log, empty on a runtime crash). Now the actual Python
   traceback is inline. A "View console output" button in the same
   section opens the full serial console in a modal.

2. New ConsoleModal component. Fetches GET /workspaces/:id/console
   (platform → CP → ec2:GetConsoleOutput). Portal-rendered above the
   canvas with Copy / Close / Esc handlers. Renders a friendly message
   on 501 (self-hosted deploys without CP) and 404 (instance
   terminated).

3. ProvisioningTimeout's "View Logs" button now opens the console
   modal instead of the (usually empty) terminal tab — when a
   workspace is stuck in provisioning, the cloud-init + user-data
   trace is what the user actually needs.

Tests cover the closed-state no-fetch, happy-path fetch, 501/404
messaging, and Close/Escape wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 17:22:15 -07:00