Commit Graph
95 Commits
Author SHA1 Message Date
ciregenz 1b6d747326 [eric] merge #107 (pierre): app-use OPENSWARM_APP bridge + AppAgent
# Conflicts:
#	electron/main.js
#	frontend/src/app/pages/Views/ViewPreview.tsx
2026-06-29 21:34:11 -07:00
ciregenz f3c8189751 [eric] merge eric/browser-parity: in-app browser parity (persistence, focus keystone, zoom/find/tab/middle-click, reopen-closed)
# Conflicts:
#	backend/apps/outputs/workspace_io.py
2026-06-26 09:10:19 -07:00
abccodesandciregenz e38c54150a [aidan] fix/app-export: stop file-cap marker from corrupting oversize app files 2026-06-26 07:50:19 -07:00
AidanandGitHub 180da5ea40 [aidan] fix/app-selection: surface real app workspace path in selection so the builder edits in place (#109) 2026-06-26 07:30:13 -07:00
ciregenz 421806a196 [eric] runtime: npm --ignore-scripts on app installs to block untrusted-dep postinstall code-exec 2026-06-26 05:23:57 -07:00
ciregenz a2b8a2c335 [eric] build: bundle npm with node so packaged apps can install custom deps (fixes imported backend apps not starting) 2026-06-26 05:14:04 -07:00
ciregenz ce7b22a216 [eric] swarm: exclude .DS_Store/Thumbs.db from app exports (WALK_SKIP_FILES) 2026-06-26 04:42:02 -07:00
SirKentut 75df12a1b7 [pierre] feat: merge app-use (OPENSWARM_APP bridge + AppAgent) onto eric/dev, convention-clean
Brings the app-use feature (OPENSWARM_APP bridge, AppAgent delegation tool,
BrowserClickPoint, autopilot supervision) onto the linted eric/dev base.

- Resolved 9 conflicts favoring eric's refactored structure; renamed all of
  pierre's _-prefixed names to p_/P_, kept eric's prior_messages resume guard.
- Made the 4 test-exercised bridge helpers public (p-private rule).
- Wired AppAgent into browser_delegation_tools + BuiltinTool registry and
  threaded selected_app_output_ids -> OPENSWARM_SELECTED_APP_IDS (eric had
  forward-ported the prompt but not the tool, so it was unreachable).
- Linter clean (underscore/p-private/ruff/cycles 0); 301 backend tests pass.
2026-06-26 02:44:10 -07:00
ciregenz 8cb781c01c [eric] apps: only link warm node_modules on import when package.json matches template (custom-dep apps install their own) 2026-06-25 23:21:44 -07:00
ciregenz bdf576126d [eric] apps: link node_modules on import so imported backend apps boot first time, no restart 2026-06-25 23:09:21 -07:00
SirKentut 42ad32ee6c [pierre] testing: frames show if autopilot is succesfully working 2026-06-25 19:53:25 -07:00
SirKentut a10617526a [pierre] feat: add __autopilot__ self-play bridge with slow-cadence agent supervision
Two-loop design for fast-twitch apps (Flappy, Doodle Jump) the agent cannot
react to frame-by-frame over the network: the bridge runs policy() at frame
rate as the reflex (inner loop), while the supervisor steers on a slow cadence
via getState and __autopilot__ knobs (outer loop). Wires this through the
webapp_template bridge, the shell-injected bridge in main.js, and the APP
system prompt. Also deny the 'fullscreen' permission so a preview webview's
HTML5 fullscreen no longer hijacks the whole OpenSwarm window.
2026-06-25 19:32:17 -07:00
ciregenz 0d093cc5f8 [eric] backend: one-line every comment + collapse 3+ blank runs across apps/ (AST-verified identical, -lines); CLAUDE.md one-line-comment rule 2026-06-25 02:29:04 -07:00
ciregenzandciregenz 9ea40fbf7b [eric] apps: edit selected App in place, no duplicate on launch 2026-06-24 18:29:34 -07:00
ciregenzandciregenz 01358a8083 [eric] apps: seed fills missing files only so reopen keeps agent edits 2026-06-24 18:26:56 -07:00
ciregenz 7701bcdeff [eric] backend: convert all relative imports to absolute backend.* paths (convention sweep) 2026-06-24 01:41:22 -07:00
ciregenz 6ab6217ac7 [eric] backend: final leading-_ cleanup, file-local shorts + move session cancel-event to manager-side table (off the pydantic model, kills the last underscore); naming linter now 0/0 2026-06-23 21:57:20 -07:00
ciregenz 1bcc78567b [eric] backend: leading-_ -> p_/P_/public for class methods + module conditional-block vars + _ReadyServer class + _pending_oauth import; promote cross-file (search_ddg) 2026-06-23 21:50:08 -07:00
ciregenz d608eb68e3 [eric] backend: leading-_ -> p_/public for class-private self-attributes (coordinated .attr + string-ref rename); promote cross-file attrs (per_session/idle_lru/payload) 2026-06-23 21:47:49 -07:00
ciregenz b04d10d3b6 [eric] update cross-module + test refs to promoted main/auth symbols (TOKEN/ws_auth_ok/etc.) 2026-06-23 21:28:19 -07:00
ciregenz 798448acca [eric] apps: leading-_ -> p_ for function-local vars/args/nested-fns across 53 apps modules (scope-aware AST rename, module symbols untouched, p-private 0) 2026-06-23 21:11:44 -07:00
ciregenz a4c92aaa33 [eric] update cross-module + test refs to promoted service/version symbols 2026-06-23 20:53:27 -07:00
ciregenz 991af1b580 [eric] outputs: leading-_ -> p_/P_/public across outputs subsystem (runtime, publish, versions, workspace_io, view_builder_templates); promote cross-file API public (save/load/find_free_port/etc.), fix re-export + monkeypatch test refs 2026-06-23 19:54:26 -07:00
ciregenz 751bb77032 [eric] agents: publicize cross-mixin members (p_run_agent_loop, p_build_mcp_servers, etc.) + safe_resp_text so the decomposition passes p-private 2026-06-23 16:44:41 -07:00
ciregenz 633033245b [eric] webapp-cache: drop a stray em-dash in run.sh comment 2026-06-22 02:53:33 -07:00
ciregenz ec8fc4b7c0 [eric] webapp-cache: validate-or-nuke half-installed warm cache, heal off the hot path 2026-06-22 02:51:30 -07:00
SirKentutandciregenz 936f33033a [pierre] fix: 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>
(cherry picked from commit 998e8605c6)
2026-06-22 02:47:17 -07:00
ciregenz be41094c80 [eric] outputs: version-history routes + mount + delete cleanup 2026-06-22 02:41:18 -07:00
ciregenz 8d1c3f2b8c [eric] outputs: content-addressed app version store (blobs + manifests) 2026-06-22 02:41:18 -07:00
ciregenz ee5b5c2cea [eric] publish: split 379-line monolith into scan/build/cloud modules + memoize scan by source hash 2026-06-20 03:06:44 -07:00
ciregenz f611703886 [eric] outputs: remove two dead pass no-ops 2026-06-19 21:20:46 -07:00
ciregenz 6a8197c05b [eric] publish: never bundle secret-shaped files (.env, private keys) into a public app 2026-06-19 21:20:46 -07:00
ciregenz 7a9eb214e9 [eric] publish: neutralize vite-plugin-terminal during build so older workspaces build clean 2026-06-19 20:19:44 -07:00
ciregenz ef1c7a28e2 [eric] publish: don't embed the install token in preview app JS; stub OUTPUT_* (run only when published) 2026-06-19 17:47:25 -07:00
ciregenz ab30c08733 [eric] publish: switch hosting apex to openswarm.host (bought) from openswarm.dev 2026-06-19 16:45:30 -07:00
ciregenz abcd334b34 [eric] publish: OUTPUT_COMPUTE/OUTPUT_LLM runtime in preview + /outputs/llm endpoint + skill doc 2026-06-19 04:57:06 -07:00
ciregenz 21a0694914 [eric] publish: send output_id + override to cloud so republish reuses the slug 2026-06-19 04:15:02 -07:00
ciregenz 722a9e896a [eric] publish: desktop build/scan/bundle + publish/preflight/unpublish endpoints 2026-06-19 03:28:27 -07:00
SirKentut a45bcf7f01 [pierre] docs: note OPENSWARM_APP bridge works in lightweight app builder mode 2026-06-18 02:36:32 -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
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
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
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
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
ciregenz 861f3520f9 [eric] app-builder: drop the em-dash from the skill prompt (precedence: no em/en-dashes anywhere) 2026-06-13 02:08:31 -07:00
SirKentut b498ed3097 implemented app-describe for agent use: exposing the command tree of an app 2026-06-13 01:01:11 -07:00
AidanandGitHub 08526b6149 [aidan] bug/feat: sidebar reordering, title improvements, openai gen bug (#76)
* [aidan] ui: sidebar reorder

* [aidan] ux: sidebar naming bug fix

* [aidan] ui: title changing improvements

* [aidan] ui/ux: aux title gen streams for cx/ route + agent writes meta.json first

- All aux LLM calls (chat title, turn label, group meta, dashboard name) now stream
  instead of using messages.create; 9router's cx/ subscription response translator
  drops content for GPT-5-family models on the non-streaming path but works per-event.
- aux_max_tokens_for floors GPT-5 budget at 4K so reasoning still leaves headroom for
  a label; non-reasoning models get the base 100.
- App Builder skill: write meta.json FIRST (step 1 of Quick start) so the app's name
  surfaces in the sidebar + ViewEditor header on the agent's first tool call instead
  of waiting until end-of-turn.
- Session-end sync_output_from_meta_json takes a fallback_name (= session.name) so an
  agent that never writes meta.json still leaves the app with the aux-LLM chat title
  rather than "Untitled App".
- Title display: truncateForTitle caps at 4 words / 30 chars; displayChatTitle picks
  the right Phase 1 placeholder by session.mode; normalizeSessionName strips legacy
  Agent-XXXX names at slice intake.
- Typewriter component (char-by-char delete-then-type) drives the chat header,
  dashboard card title, sidebar Apps entry, and ViewEditor TextField + description
  field; honors useReducedMotion.

* [aidan] tune: reduce gpt-5 aux token floor
2026-06-12 23:33:32 -07:00
ciregenz 893f016461 [eric] outputs: idle-paused (SIGSTOP) runtimes stop advertising their frozen port, the real fix for the app-switch ERR_FAILED 2026-06-10 01:44:53 -07:00
ciregenz b13cc5c2b9 [eric] outputs: gate preview URL on a live runtime, a crashed vite no longer hands the webview a dead port (ERR_FAILED on reopen) 2026-06-10 01:35:12 -07:00