Commit Graph
103 Commits
Author SHA1 Message Date
Alex Gleason a72eec2966 Add typecheck tool that typechecks projects like tsc --noEmit
Adds a 'typecheck' AI tool backed by a new src/lib/typecheck module that
runs the real TypeScript compiler against the project VFS in the browser:

- In-memory CompilerHost over project files, with tsconfig.json parsing
  (including local extends chains and Vite-style project references)
- TypeScript's bundled lib.*.d.ts files served as lazy-loaded chunks
- Type declarations for npm dependencies acquired from jsdelivr via
  @typescript/ata, pinned to package-lock.json/package.json versions
  (including declared @types/* packages, since ATA's own DT fallback
  always fetches latest), cached per session
- Vite ambient type shim (asset imports, import.meta.env) when vite/client
  types are unavailable
- Missing external type declarations reported as notes instead of errors
- Network concurrency capped at 16 in-flight requests to avoid the browser
  failing dependency downloads with ERR_INSUFFICIENT_RESOURCES
2026-07-20 13:11:53 -05:00
Alex Gleason 18815f0649 fix: resolve all npm audit security vulnerabilities
Ran npm audit fix to resolve 19 vulnerabilities and upgraded vitest from
v3 to v4.1.8 (breaking change) to fix the critical UI server advisory
(GHSA-5xrq-8626-4rwp).

Vitest v4 no longer allows vi.fn() mocks to be used as constructors, so
converted constructor mocks (IntersectionObserver, ResizeObserver,
AbortController, NPool/NRelay1) to real classes in the test setup and
affected test files.

npm audit now reports 0 vulnerabilities.
2026-06-05 09:23:29 -05:00
hzrd149andClaude Opus 4.7 0013ece013 Add nostrconnect:// QR code login for NIP-46 remote signers
Adds the client-initiated NIP-46 flow alongside the existing bunker:// paste
input. Desktop users scan a generated QR code with their signer app
(Amber, nsec.app, etc.); mobile users get an "Open signer app" deep-link
plus a /remoteloginsuccess callback page. The pasted bunker:// URI moves
into a collapsible fallback below the QR.

A shared BunkerLoginPanel component owns the session lifecycle and is
embedded in both LoginDialog and SimpleLoginDialog. The listener effect
depends only on a sessionToken and reads login/onLoggedIn/config through
refs so parent re-renders don't tear down an in-flight handshake.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-12 16:08:38 -05:00
Alex Gleason 5484a57f08 Change default preview domain to iframe.diy 2026-04-29 15:19:27 -05:00
Alex Gleason 376a982449 Overhaul shell commands for POSIX compliance and AI-agent ergonomics
Each built-in shell command has been audited and rewritten to support the
options AI agents (and humans) typically reach for, close critical behavior
gaps, and align with POSIX/GNU conventions:

- Shared argument parser (utils.ts) handles combined short flags, long
  options with '=VALUE' or space-separated values, the '--' sentinel,
  numeric shortcuts like 'head -5', and '-' for stdin.
- cat, ls, cp, mv, rm, mkdir, touch: added missing common flags; removed
  the legacy 'absolute paths are not supported' and 'reading from stdin
  is not supported' barriers where they made agent use awkward.
- mv now overwrites destinations by default (POSIX) and supports -n.
- touch updates mtime on existing files (by rewriting content) and
  accepts -c/-a/-m/-h/-r/-d/-t options.
- find: new expression engine with -iname, -path, -regex, -type,
  -empty, -size, -maxdepth, -mindepth, -not, -or, -print/-print0,
  -delete, -quit.
- grep: -v, -c, -l, -L, -w, -x, -o, -q, -E, -F, -G, -H, -h, -A/-B/-C
  context, --include/--exclude, multiple -e, -f scriptfile.
- head/tail: -c bytes, -NUM shorthand, negative/positive line counts,
  proper multi-file headers.
- sort: -k keys, -t separator, -o output, -f/-b/-d/-s, -h/-V/-M modes.
- uniq: -i, -f, -s, -w, -D, and the [input [output]] form.
- wc: -m characters and -L longest line; -c now counts bytes (UTF-8).
- cut: open-ended ranges (3-, -5), -s, --complement, --output-delimiter.
- tr: -c/-s/-t, [:class:] character classes, escape sequences.
- sed: real multi-command parser supporting ';', addresses (N, $,
  /re/, N,M), '!' negation, proper -n quiet mode, y///, and -i[SUFFIX].
- echo: -n, -e, -E with standard backslash escapes.
- pwd/cd: -L/-P, plus cd -, cd ~, cd $HOME with OLDPWD tracking.
- diff: proper LCS algorithm producing correct normal and unified
  output; adds -q, -s, -N, -i, -w, -b, -B.
- env: -i, -u, NAME=VAL assignments; reads the live shell environment.
- date: -u, -d, -R, -I, and a full GNU-subset format specifier set.

Tests for each command were updated to reflect the corrected behavior
(e.g. absolute paths and stdin are now accepted, POSIX error messages).
All 1334 tests pass; typecheck and production build succeed.
2026-04-26 23:58:13 -05:00
Alex Gleason 1fd3d23d4f Support Tailwind CSS v4 in project builds
Detect the Tailwind major version from the project's package.json and
branch the build pipeline accordingly. v3 projects keep loading the Play
CDN runtime and a JS tailwind.config via the existing synthetic entry.
v4 projects instead pull in @tailwindcss/browser@4, which auto-scans the
document and reads theme config from CSS (@theme / @import 'tailwindcss')
so no config shim is required.
2026-04-26 19:56:25 -05:00
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 429dafce92 release: v9.11.3 2026-04-12 10:52:18 -05:00
Dmitriy E b80205a942 fix: render AppDialog on mobile project view 2026-04-06 15:13:12 +03:00
Alex Gleason 269047d742 Update default blossom servers and relay lists
Add blossom.ditto.pub and blossom.dreamith.to to the top of all blossom
server lists. Add relay.dreamith.to below relay.ditto.pub and remove
relay.damus.io and purplerelay.com from deploy relay lists.
2026-04-03 23:59:20 -05:00
Alex Gleason b1b451072b Fix bunker issue by upgrading Nostrify 2026-04-03 13:17:38 -05:00
Alex Gleason a644994e93 refactor: replace showcase moderator with curator using NIP-19 event p-tags
Replace the hardcoded 'moderator' npub pattern with a 'curator' field that
accepts any note1/nevent1/naddr1 identifier. The p-tag pubkeys from the
resolved event are used as authors in a kind 31990 (#t:shakespeare) query.
Client-side filter ensures only apps with a 30617 git repo reference are
shown, guaranteeing the 'Edit with Shakespeare' button can be rendered.

All moderation controls (approve/feature/hide/etc.) are removed from
AppShowcaseCard. AppShowcase is simplified to a flat grid.
2026-04-03 01:08:46 -05:00
Alex Gleason 6ff25096d4 Fix zapstore publish: remove --skip-metadata to upload app icon 2026-04-02 20:06:44 -05:00
Alex Gleason b270651a9c Add Capacitor Android app setup with deep links, splash screen, and release signing 2026-04-02 03:56:35 -05:00
Alex Gleason 37c19be7ee Fix versioning: start at 9.9.1, move changelog into app shell
Bump starting version from 9.9.0 to 9.9.1. Move the /changelog page
from a standalone layout into AppLayout so the project sidebar is
available. Remove it from the settings nav since it's its own page.
2026-04-02 02:19:50 -05:00
Alex Gleason b7ce705b2b Add versioning system, changelog page, and release skill
Replace calver (YYYY.MM.DD+sha) with marketing versioning (X.Y.Z),
starting at 9.9.0. Add changelog page at /changelog with Keep a
Changelog parsing, pre-release banner, and expandable entries linked
to GitLab releases. Add VersionCheck component that shows a "What's
new" toast when the app version changes. Add release skill for
managing versioned releases with changelog and git tagging.
2026-04-02 02:09:00 -05:00
hzrd149 113fc0a326 Include source tags in nsite deployments 2026-03-25 16:25:22 -05:00
Alex Gleason 9e29153a95 npm audit fix 2026-03-24 17:27:40 -05:00
hzrd149 d51fee34e3 Update nsite deployment
Add support for named sites under users key
2026-03-24 17:03:39 -05:00
Alex Gleason 5a431ae5f2 Add Plausible Analytics integration with AppConfig support 2026-03-11 18:34:48 -05:00
Alex Gleason bacac24ee3 npm audit fix 2026-02-12 12:22:40 -06:00
Alex Gleason 078d843b78 Upgrade to zod 4 2026-01-23 23:56:10 -06:00
Alex Gleason b0a48accf3 npm audit fix 2026-01-21 21:20:10 -06:00
Alex Gleason 6ba5cf9bb2 Enable TypeScript strict mode 2026-01-21 14:46:11 -06:00
Alex Gleason 79759af337 Merge branch 'ppqFeedback' into 'main'
PPQ Feedback

See merge request soapbox-pub/shakespeare!97
2026-01-21 19:53:27 +00:00
Alex Gleason 0d6bee2025 Add Maple AI support 2026-01-17 23:22:02 -06:00
lemonknowsall 5348ab1fda remove unused import and prop 2026-01-16 23:15:00 -08:00
Alex Gleason 5d075e02ab npm audit fix 2026-01-11 13:18:05 -06:00
Alex Gleason 45edc6a777 Lemon keeps adding "peer": true to my package-lock.json for some reason 2026-01-03 19:23:23 -06:00
lemonknowsall a96e028bb5 include fees with lightning payments 2026-01-02 09:35:04 -08:00
Alex Gleason f4a3953d4d Remove Electron functionality 2026-01-01 16:36:35 -06:00
Alex Gleason e599f76787 Add back a simple useGitFetch hook 2025-12-24 21:38:57 -06:00
Alex Gleason 6a12e1f4f4 npm i baseline-browser-mapping@latest -D 2025-12-24 20:10:57 -06:00
Alex Gleason 8224589dbe CloudUpload icon for GitSyncButton 2025-12-22 18:09:23 -06:00
Alex Gleason d82df433de Upgrade nostrify 2025-12-22 13:28:00 -06:00
Alex Gleason a957338afd Revert "Fix happy-dom vuln"
This reverts commit 94d62b254d.
2025-12-21 04:11:22 -06:00
Alex Gleason 94d62b254d Fix happy-dom vuln 2025-12-21 02:27:50 -06:00
Alex Gleason 112a042bc5 npm audit fix 2025-12-21 01:46:22 -06:00
Alex Gleason c53233d5d8 npm i 2025-12-21 01:45:40 -06:00
lemonknowsall 421c3f2b2b add remaining apps to 'More Apps' section 2025-12-11 21:22:51 -08:00
Alex Gleason e2f816b6c1 Add MCP support 2025-11-21 20:14:38 -06:00
Alex Gleason 58c24f615d Swap out eta for nunjucks 2025-11-13 19:49:15 -06:00
Alex Gleason db02b9fb94 Let system prompt be configurable in System Settings (EJS template) 2025-11-13 17:36:04 -06:00
Alex Gleason c24f72b34c Implement plugins system / skills 2025-11-05 23:44:14 -06:00
Alex Gleason b57cdb2561 Add an error boundary 2025-11-03 20:18:32 -06:00
Alex Gleason 0affd69adf Sentry 2025-11-03 18:22:05 -06:00
Alex Gleason ccd26cbb71 Add custom electron publish script 2025-10-29 22:48:21 -05:00
Alex Gleason 897a8e40bb Make electron app installable with npm 2025-10-29 21:12:23 -05:00
Alex Gleason 8e296f2eb8 Merge remote-tracking branch 'origin/main' into electron 2025-10-27 13:05:08 -05:00
Alex Gleason cfa8f69ad5 Add offline support 2025-10-25 10:25:33 -05:00