Commit Graph
1313 Commits
Author SHA1 Message Date
Eric 24df3e8fac [eric] backend: fast-fail is_running() to kill the ~18s cold-start event-loop freeze
- faulthandler on the signed cold build caught the asyncio loop frozen in
  socket.create_connection inside is_running() (process.py): a synchronous
  httpx.get to "localhost:20128" called ~5x on the boot path before 9Router is up
- on Windows a dead-port connect to "localhost" stalls ~7s each (tries ::1 first,
  loopback refusal is slow), freezing the loop ~18s so uvicorn could not answer
  the health probe -> cold backend-http-ready was ~23s
- fix: probe 127.0.0.1 with a 0.3s TCP timeout first (measured 306ms vs ~7s), only
  HTTP-confirm when the port is open; 9Router binds 0.0.0.0 so reachability is
  unchanged. drop the faulthandler diagnostic from main.py
2026-06-17 19:06:10 -07:00
Eric 035ef26c0f [eric] backend: faulthandler stack-dump + settings boot log to catch the cold loop stall
- v1.3.89 cold proved two stacked stalls: ~5s in is_running() (sync httpx) and a
  bigger ~13s BEFORE any background task runs, a silent event-loop freeze
- add faulthandler.dump_traceback_later(7s, repeat) to a temp file so a dump lands
  inside the 13s window and names the exact synchronous call the loop is stuck in
- add an entry log to settings._boot_router_then_sync (first startup bg task)
- diagnostic only; reverted once the stall is pinned
2026-06-17 18:40:01 -07:00
ciregenz c577382943 [eric] oauth: complete Claude callback server-to-server, not a cross-port browser 302 (fixes browser-dependent 'Connecting' hang from #84) 2026-06-17 18:24:33 -07:00
Eric 90aa66f6ce [eric] backend: timestamp each startup background task to pin the cold-start loop stall
- instrumented cold v1.3.88 proved the lifespans are 141ms even cold; the ~18s
  cold gap is a backgrounded create_task blocking the event loop AFTER lifespan
  startup but BEFORE uvicorn reports ready (what the health probe waits on)
- add [perf] entry/segment logs to the post-startup background tasks: mcp refresh,
  skill refresh, 9router ensure (+ prelude bisection), and svc._post/_post_or_spool
- logging only, no behavior change; next cold log names the exact blocking call
2026-06-17 18:11:46 -07:00
ciregenz 6b8750efaf [eric] 9router: rotate the unbounded request-details log + cap node heap, fixes the idle OOM crash 2026-06-17 16:20:59 -07:00
ciregenz 18be72cf9c [eric] phase3b: 'fresh runs in ~Xh' on the spent nudge + one-tap continue-on-your-model after exhaustion 2026-06-17 01:14:40 -07:00
ciregenz 46753fa9c8 [eric] aux: fix stale sonnet id (claude-sonnet-4-20250514 4.0 -> claude-sonnet-4-6), was 404ing every aux call 2026-06-17 00:46:21 -07:00
ciregenz 8c93d42226 [eric] phase2: fire connect offer on MCPSearch/MCPList (not just loop), 8s preflight, render below the reply 2026-06-17 00:30:42 -07:00
ciregenz 78c0971e88 [eric] phase2: wire in-task MCP connect offer into the ToolSearch loop-breaker (suggest-only, slug-matched) 2026-06-16 22:34:28 -07:00
ciregenz b8dc125da7 [eric] phase2: suggest-only offer_for_gated_server core + gate-safety invariants (in-task MCP connect) 2026-06-16 22:23:02 -07:00
Eric bca0050dcb [eric] perf: start 9router in background instead of blocking the http bind
- service lifespan was awaiting ensure_9router (~7.4s, up to ~18s cold) on the boot path

- dispatch already ensures it lazily; serialize ensure_running so no double-spawn

- cuts warm backend-ready ~9-10s toward ~2-3s
2026-06-16 21:59:16 -07:00
Eric 1facda5c33 [eric] app-builder: spawn vite directly via bundled node on windows (no bash)
- frontend-only apps no longer need git bash; kills the [WinError 2] preview failure

- windows-only, falls back to bash run.sh for backend apps or when vite is absent
2026-06-16 21:58:59 -07:00
Eric fe9f8d7105 [eric] app-builder: windows node_modules link fallback + prefer pre-extracted bundle
- _link_node_modules falls back symlink -> junction -> copy (no admin needed)

- _ensure_warm_cache prefers a pre-extracted resources tree, zero first-app extract (#9 item 2)

- falls back to tar/npm when absent so mac/older builds are unchanged; add tests
2026-06-16 21:58:59 -07:00
Eric ccc06ea188 [eric] skills: seed registry from bundled snapshot + disk cache, retry until first fetch
- fixes empty skills list until reboot and onboarding skill-item-pdf timeout

- catalog never empty offline; add regression test, 3 cases
2026-06-16 21:58:59 -07:00
ciregenz 374ded0214 [eric] share: minimal import modal, name lives in the title, one type+counts line, inline need chips, single-line trust note 2026-06-16 05:08:09 -07:00
ciregenz 9d1ff22a41 [eric] 9router: verify-at-boot, report why a start failed (no silent DEVNULL) + no dev-npm fallback in packaged 2026-06-16 04:55:14 -07:00
ciregenz 3998a8d6d9 [eric] sessions: get_all_sessions promotes only disk sessions the layout still cards, so deleted chats stop resurrecting on reopen 2026-06-16 04:44:15 -07:00
ciregenz a99e310940 [eric] diagnostics: attach secret-scrubbed 9router stderr tail to model_error telemetry (was masked 'check stderr') 2026-06-16 04:35:54 -07:00
ciregenz 07ef98f7e5 [eric] approvals: persist tool policy on Always-approve (set_always_allow through the approval path) 2026-06-16 04:00:08 -07:00
ciregenz c9caaf8a8c [eric] permissions: default Bash to always_allow (seed + one-time lift) so shell commands stop prompting 2026-06-16 04:00:04 -07:00
ciregenz 1f86a66b87 [eric] swarm: remap view-card parent_session_id on share (new #89 field would import dangling) 2026-06-16 03:46:29 -07:00
AidanandGitHub d2d0ce74aa [aidan] ux/app-builder-dashboard: improve app builder dashboard (#89)
* [aidan] ux: when agent creates app always opens in dashboard

* [aidan] enhancement: app editing ui mimicing browseragents

* [aidan] ui/ux: when building app window appears immediately

* [aidan]: app view spacing dashboard mimicing browser

* [aidan] ux: app error agent loop

* [aidan] fix: remove duplicate logic
2026-06-16 03:44:40 -07:00
ciregenz 131b3136eb [eric] sessions: get_all_sessions reads disk too so imported (and post-restart) dashboard cards render instead of blank 2026-06-16 03:03:28 -07:00
ciregenz 2301ff7a70 [eric] swarm: read live session from memory first on export, plus full dashboard round-trip test 2026-06-16 02:41:25 -07:00
SirKentutandClaude Opus 4.8 8cf868784f [pierre] fix/app-agent: re-attach app controls on every task
Run AppDescribe and front-load the app's controls each task in app mode,
not just on fresh conversations. The bridge can appear between runs and a
resumed history may carry a stale screenshot-it strategy; re-reading the
controls re-points the agent at the bridge instead of inheriting old fumbling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 00:52:00 -07:00
AidanandGitHub de2e70ca8f [aidan] fix/browser-early-close: let agent keep browser open when result lives on the page (#88) 2026-06-15 19:00:40 -07:00
ciregenz 3bf1b0da79 [eric] mcp: break the ToolSearch loop, redirect a stuck agent to MCPActivate for gated servers 2026-06-15 18:58:50 -07:00
ciregenz 39c837fee7 [eric] swarm: carry the chat transcript when sharing an agent (was dropped, scrub layer guards secrets) 2026-06-15 18:58:44 -07:00
SirKentutandClaude Opus 4.8 a35bfaaf7d [pierre] feat/app-agent: drive web apps through the OPENSWARM_APP bridge
Browser agent gains app-control logic + schema, app-builder skill doc,
run.sh agent-bridge presence check, and app-agent tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 15:06:10 -07:00
ciregenz b0401b06d0 [eric] openai: route the thinking-slider effort param to gpt/codex (not just claude) 2026-06-15 14:46:48 -07:00
ciregenz 46e92c9fe0 [eric] dashboards: drop orphan session cards from GET so a dead-session card stops 404ing on load 2026-06-15 14:34:16 -07:00
ciregenz ad00fd19ae [eric] error-classify: schema-translation 400s aren't auth; gemini RESOURCE_EXHAUSTED is transient 2026-06-15 14:05:21 -07:00
ciregenz ad1a9b439e [eric] swarm: validate manifest structure at stage time (root/dup-id/edge integrity, outside checksum) 2026-06-15 14:00:19 -07:00
ciregenz c43da8950e [eric] swarm: scan workspace file bytes for secrets on export, not just payload keys 2026-06-15 13:59:11 -07:00
ciregenz 62acc4b8c0 [eric] models: drop banned Claude Fable + unrunnable Gemini 3.1 Pro from the picker 2026-06-15 13:44:22 -07:00
ciregenz 076c47617a [eric] gemini: prefer connected Antigravity over AI Studio key + fail-fast read timeout 2026-06-15 12:36:29 -07:00
ciregenz 235fa47d15 [eric] providers: openai own-key keeps cp-openai/ prefix so 9router can route it 2026-06-15 11:59:11 -07:00
ciregenz f93d6e02d1 [eric] 9router: port the 0.4.x /api auth gate (x-9r-cli-token) to unblock a version bump 2026-06-14 20:27:39 -07:00
ciregenz 124b128ed1 [eric] proxy: fix non-Anthropic first-msg 400s (Gemini allowlist + gpt-5 sampling strip) 2026-06-14 16:58:26 -07:00
ciregenz 9086ef5af2 Merge remote-tracking branch 'origin/eric/dev' into eric/dev 2026-06-14 08:59:19 -07:00
cireandGitHub e47ac3bf67 Revert "[aidan] bug: dashboard not renaming during first run" (#83)
This reverts commit 2d7be0e8ac.
2026-06-14 08:58:49 -07:00
ciregenz 7eeb864a29 [eric] swarm: archive checksum (reject tampered) + transactional rollback on import 2026-06-14 08:07:17 -07:00
AidanandGitHub f08f71313f [aidan] ui/ux: auth flow fixes (#84)
* aidan] bug: fixed 2 auth claude login issue

* [aidan] bug: claude login w email+pw

* [aidan] ui: edited message for cases where anthropic redirects to enter email code even after login'

* [aidan] ui/ux: fix connecting status accuracy
2026-06-14 07:55:24 -07:00
SirKentut f90975f006 feat(webapp-template): ship agent bridge (window.OPENSWARM_APP) as a hook, not a doc
Add agentBridge.ts and import it FIRST in index.tsx so the bridge is
installed on the window before any app code runs.

The visitor / door / doorbell analogy:

- The visitor is the agent. It shows up wanting to operate the app:
  read the rules, see the controls, take an action, check what happened.
- The door is window.OPENSWARM_APP. A single, always-present surface the
  visitor can knock on: describe() to learn the app, getState() to read a
  snapshot, invoke(name, args) to act.
- The doorbell is register({ rules, controls, getState, invoke }). The app
  presses it on mount to say "I'm home, here's how to talk to me." Until it
  does, describe()/getState() answer { __ready: false } so the visitor
  knows the app is still booting and waits, instead of concluding nobody
  lives here.

Why a hook and not just an .md:

A markdown instruction ("please expose your controls on window.X") is a
request the app can forget, half-implement, or drift from, and nothing
fails when it does. The bridge ships WITH the template and is imported
before app code, so the door exists from first paint whether or not the
author thought about agents. The app's only job is to press the doorbell
once; it never wires the plumbing, so it cannot get the plumbing wrong.
The contract is executable, not aspirational, which is the difference
between every generated app being agent-operable by default and hoping
each one remembered to be.
2026-06-14 07:49:13 -07:00
ciregenz 4e1df63b7c Merge remote-tracking branch 'origin/eric/dev' into eric/dev 2026-06-14 07:44:15 -07:00
ciregenz 6899ea5bd1 [eric] swarm: dashboard export/import (closure of agents+apps+modes, two-class deps) 2026-06-14 06:44:16 -07:00
ciregenz 9b80d0417a [eric] swarm: workflow export/import entity (lazy store, schedule-off + PII-strip on import) 2026-06-14 06:27:52 -07:00
ciregenz d2a7b79eaf [eric] swarm: app export/import (workspace tree, .env regen) + code-safety review 2026-06-14 06:11:16 -07:00
ciregenz ace783f4ef [eric] swarm: .swarm bundle engine + skill export/import endpoints 2026-06-14 05:55:28 -07:00
SirKentutandClaude Opus 4.8 eb6278ff5c fix(webapp-template): self-heal half-installed vite warm cache
An npm install killed mid-warm leaves node_modules/ populated but no
.bin/, so _ensure_warm_cache (which only checked the dir exists) trusted
the half-tree forever and every app symlinked to it died with
`vite: command not found`. Gate the cache on .bin/vite existing, and
harden the app's frontend/run.sh skip-install guard the same way.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 02:35:19 -07:00