32 Commits
Author SHA1 Message Date
Alex Gleason 695a697e88 Support new Worker(new URL(..., import.meta.url)) and asset URLs
Shakespeare's esbuild-wasm pipeline now handles the Vite/webpack-compatible
patterns for module workers and static asset URLs, so projects using
  new Worker(new URL('./w.ts', import.meta.url), { type: 'module' })
  new SharedWorker(new URL('./w.ts', import.meta.url), { type: 'module' })
  new URL('./logo.svg', import.meta.url)
build correctly under Shakespeare instead of emitting a 404'ing URL
that pointed at the source-file path inside the main bundle.

Mechanics:
- A new detection pass (src/lib/build/workerPlugin.ts) is invoked from
  the fs plugin's onLoad for .ts/.tsx/.js/.jsx/.mjs files. It cheaply
  regex-prefilters on 'new URL(' so 99% of files pay zero overhead,
  then strips TS/JSX via esbuild.transform and parses with acorn +
  acorn-jsx for the handful of files that actually match. The string
  literal spec inside each matched new URL() call is replaced with a
  unique placeholder token, preserving the enclosing new URL(...,
  import.meta.url) shape so runtime resolution against the main
  bundle URL still works.
- bundle() now runs a per-worker sub-build (esbuild.build) with the
  same plugin stack, producing a hashed ESM chunk alongside the main
  output. The queue drains recursively so nested workers / assets
  discovered during a sub-build are handled in the same bundle call.
- Non-source assets are copied into the output with content-hashed
  filenames (SHA-256 when SubtleCrypto is available, FNV-1a fallback
  for test environments).
- After all sub-builds finish, placeholder tokens are string-replaced
  in every JS output with the corresponding './<emitted-filename>'.
- updateCSPForEsmSh gains an emittedWorkers option; when set it
  additionally ensures worker-src and child-src exist and extends
  them with the ESM CDN so module workers can import from esm.sh.

Errors (with file:line context) are raised for classic (non-module)
workers, dynamic specifiers, and unresolvable worker specs. Plain
new URL() pointing at a source file emits a console warning and is
left untransformed.

Tests: 16 new workerPlugin unit tests cover detection, errors,
dedup, and quote-style handling; 4 new CSP tests cover the
emittedWorkers path.
2026-04-25 17:32:14 -05:00
Alex Gleason ed40469af4 Add agent rule: always commit after finishing a turn 2026-03-29 01:34:42 -05:00
Alex Gleason c2664fc6d2 Add blossom_upload AI tool for uploading VFS files to Blossom media hosting 2026-03-06 12:49:56 -06:00
Alex Gleason 556cc10f3a Add nostr_encode and nostr_decode AI tools for NIP-19 bech32 encoding/decoding 2026-03-06 12:16:56 -06:00
Alex Gleason 43a3d46023 Update relays 2026-03-06 11:45:21 -06:00
Alex Gleason 87956df961 Add webfetch and websearch tools 2026-01-21 23:25:29 -06:00
Alex Gleason f4a3953d4d Remove Electron functionality 2026-01-01 16:36:35 -06:00
Alex Gleason fa1a8781dc Redesign Deploy Settings into tile icons 2025-12-30 20:01:28 -06:00
Alex Gleason e599f76787 Add back a simple useGitFetch hook 2025-12-24 21:38:57 -06:00
Alex Gleason 0689f1cbf7 Remove DeployProjectTool for now 2025-12-21 01:11:15 -06:00
Alex Gleason ff51fa2f77 Remove fake Typecheck tool 2025-12-07 00:26:43 -06:00
DanConwayDev 056f2a0b5f Add automatic Git fetch with change detection and toast notifications
- Implement useGitFetch hook with 60-second polling
- Add toast notifications for remote changes detection
- Update GitDialog to show fetch status and manual refresh
- Add comprehensive tests for useGitFetch
- Update AGENTS.md documentation
- abstract simple time ago data function
2025-11-10 09:11:05 -06:00
Alex Gleason d79ed7df68 Connect to multiple Nostr relays. Sync NIP-65 relay list 2025-11-04 22:27:15 -06:00
Alex Gleason 64a84b3d56 Add design context from mkstack 2025-11-03 19:21:31 -06:00
Alex Gleason 8e296f2eb8 Merge remote-tracking branch 'origin/main' into electron 2025-10-27 13:05:08 -05:00
Alex Gleason a798114de0 Add rough Gift Card redeem flow 2025-10-26 22:09:02 -05:00
Alex Gleason 52f8a99654 Use OS shell for ShellTool on Electron 2025-10-23 22:51:06 -05:00
Alex Gleason b6a1ba0b59 Fix tab title 2025-10-14 21:48:55 -05:00
Alex Gleason 374d2804ad Merge branch 'consoleFramev2' into 'main'
Add tool to read console messages in chat, improve console output presentation, clear console between projects

See merge request soapbox-pub/act2!32
2025-09-25 18:27:08 +00:00
Chad Curtis 951eefb7b8 Trim down AGENTS.md 2025-09-23 14:30:39 +00:00
Chad Curtis 804efb4d23 Expose console messages via tool call. 2025-09-23 14:19:49 +00:00
Chad Curtis 6d49648580 simplify agents.md entry 2025-09-20 06:34:45 +00:00
Chad Curtis 6f4aa264eb merge in from upstream and resolve conflict 2025-09-20 03:55:34 +00:00
Alex Gleason bb830fbae5 Add translations info to AGENTS.md 2025-09-19 14:20:04 -05:00
Alex Gleason 373f25db76 Migrate AI settings and git settings to the VFS 2025-09-15 20:57:45 -05:00
Alex Gleason 80ed3d606d AGENTS: describe user messages 2025-09-14 14:08:50 -05:00
Alex Gleason f23b92c79f AGENTS.md: shell commands 2025-09-14 12:15:06 -05:00
Alex Gleason 21f9511a1e AGENTS.md: update project structure 2025-09-14 12:09:59 -05:00
Alex Gleason 82d2aed921 Clarify VFS and path security in AGENTS.md 2025-09-14 12:03:29 -05:00
Alex Gleason a84ebb16e0 Add git info to top of AGENTS.md 2025-09-12 16:33:18 -05:00
Alex Gleason 069cda512e Add VFS layout to AGENTS.md 2025-09-11 22:18:36 -05:00
Alex Gleason 774280dc90 Upgrade mkstack 2025-09-08 15:25:31 -05:00