Commit Graph

226 Commits

Author SHA1 Message Date
Source Open
8c3f32e3b2 fix(den): proxy legacy org-scoped routes (#1502)
* fix(den): support legacy org invitation routes

Restore the old org-scoped invitation paths and rehydrate sessions to a user's first organization when activeOrg is missing so older clients keep working. Include the shared types workspace in Den Docker images so the local verification stack can still build.

* fix(den): proxy legacy org-scoped routes

Route legacy '/v1/orgs/:orgId/*' requests into the new unscoped '/v1/*' handlers while preserving the current '/v1/orgs/...' endpoints. Pass the org id through middleware so old clients keep the intended workspace context and add coverage for the generic proxy behavior.

* refactor(den): trim invitation route churn

Drop the leftover invitation-specific handler extraction now that legacy org-scoped forwarding is handled generically in the org router. Keep the proxy behavior intact while returning the invitation routes closer to their original shape.

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
2026-04-20 11:46:00 -07:00
ben
0002a8e030 fix(den-api): surface invite email failures instead of silently dropping (#1483)
* fix(den-api): surface invitation email send failures instead of swallowing

Loops failures in sendDenOrganizationInvitationEmail and
sendDenVerificationEmail were being caught and logged at warn level,
so the HTTP handlers still returned 201 'Invitation created' even when
no email ever left the process. Ben observed this with two live
invitations: the DB row was pending, the UI showed it, but one of two
recipients never received the email and clicking resend re-ran the same
silent-failure path.

Root cause (from an explore audit):
- email.ts:129,132 swallowed non-2xx Loops responses and fetch throws.
- invitations.ts awaited the send and unconditionally returned 2xx.
- There is no 'skip email if user already exists' branch anywhere;
  the Slack hypothesis was wrong. The failure mode is provider-side and
  was invisible because of the swallow.

Changes:
- Introduce DenEmailSendError with a stable reason tagged union
  (loops_not_configured | loops_rejected | loops_network).
- sendDenOrganizationInvitationEmail and sendDenVerificationEmail now
  throw DenEmailSendError on failure. Dev-mode short-circuit is
  preserved (still logs the payload and returns cleanly).
- POST /v1/orgs/:orgId/invitations catches DenEmailSendError, logs via
  console.error with a stable [auth][invite_email_failed] prefix
  (greppable across deployments), and returns 502
  invitation_email_failed with a human-readable message and the
  invitationId so the UI can correlate and offer a retry. The row is
  left pending intentionally so the next submit becomes a real resend.
- Document the 502 response in the OpenAPI describeRoute.

Operator note: if LOOPS_TRANSACTIONAL_ID_DEN_VERIFY_EMAIL is unset the
signup OTP endpoint will now return a real error instead of silently
stranding the user at the OTP screen forever. This is intentional; the
previous behavior was a latent signup-breaking bug.

* fix(den-api): tolerate missing apps/desktop/package.json in Docker build

PR #1476 introduced a build step that reads apps/desktop/package.json to
bake in a default latest-app-version, but packaging/docker/Dockerfile.den
does not ship the Tauri desktop sources. As a result, the den-dev Docker
stack fails to build after the PR landed. Gracefully fall back to 0.0.0
(matching the runtime default) when the file is absent, and allow a
DEN_API_LATEST_APP_VERSION env override so deployers can still pin a
real value.

* test(den-api): add smoke script for invite email failure paths

scripts/smoke-email-failures.mjs exercises the DenEmailSendError paths
against the built dist/ of den-api. Ships with instructions so a
reviewer can rerun it inside the docker-compose den-dev container with
a single command.

Also parameterises OPENWORK_DEV_MODE in the den compose service so the
failure paths can be reached from outside the container when needed
(defaults to 1; override with OPENWORK_DEV_MODE=0 at compose time).
2026-04-17 17:06:52 -07:00
ben
800602f4e3 feat: add microsandbox sandbox flow and feature flag toggle (#1446)
* add pre-baked microsandbox image

Bake openwork, openwork-server, and the pinned opencode binary into a single Docker image so micro-sandbox remote-connect smoke tests can boot quickly and be verified with curl and container health checks.

* add Rust microsandbox example

Add a standalone microsandbox SDK example that boots the OpenWork image, validates remote-connect endpoints, and streams sandbox logs so backend-only sandbox behavior can be exercised without Docker.

* exclude Rust example build output

Keep the standalone microsandbox example in git, but drop generated Cargo target artifacts so the branch only contains source, docs, and lockfile.

* test

* add microsandbox feature flag for sandbox creation

Made-with: Cursor

* refactor sandbox mode isolation

Made-with: Cursor
2026-04-15 15:10:52 -07:00
OpenWork Release Bot
e59f391e51 chore(aur): update PKGBUILD for 0.11.207 2026-04-14 00:27:59 +00:00
OpenWork Release Bot
73b4529f36 chore(aur): update PKGBUILD for 0.11.206 2026-04-08 20:56:03 +00:00
OpenWork Release Bot
31df36ed38 chore(aur): update PKGBUILD for 0.11.205 2026-04-08 01:41:53 +00:00
Source Open
0589897b2f feat(den): add org-managed llm provider library (#1343)
* feat(den): add org-managed llm provider library

Let Den admins curate shared providers and models with encrypted credentials, then let the app connect through the existing add-provider flow. This keeps org-wide model access consistent without requiring per-user OAuth setup.

* docs(den): prefer longer db encryption keys

* fix(den): pass db encryption key through local dev

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
2026-04-06 10:17:21 -07:00
OpenWork Release Bot
2b42ce12de chore(aur): update PKGBUILD for 0.11.202 2026-04-04 20:46:15 +00:00
Jan Carbonell
5a0083fda8 Update documentation for importing skills and clarify AUR package handling (#1325)
- Revised the "Importing a skill" documentation for clarity and consistency, including updated descriptions and instructions.
- Enhanced the AUR README to specify the removal of the bundled `/usr/bin/opencode` file to prevent conflicts with `opencode-bin`, ensuring compatibility with existing installations.
2026-04-04 01:41:39 -06:00
OpenWork Release Bot
28f7346546 chore(aur): update PKGBUILD for 0.11.201 2026-04-04 02:00:34 +00:00
Source Open
780bbaa9f9 fix(den): parse skill frontmatter when saving skills (#1308)
* fix(den): parse skill frontmatter when saving skills

Keep the full SKILL.md payload in the database, derive title and description from frontmatter, and require a frontmatter name in the API. Also include shared packages in the Den web Docker image so the upload flow can be verified end to end.

* fix(den-web): transpile shared utils package

Include @openwork-ee/utils in Next's transpilePackages list so the client skill editor resolves the shared frontmatter helpers during production builds.

* fix(den-web): keep skill parsing local to the app

Move the client-side skill markdown parser into the Den web app so production builds do not depend on resolving a workspace package boundary from a client component.

* refactor(den): share skill frontmatter parsing via utils

Make Den web and Den API both depend on @openwork-ee/utils for skill frontmatter parsing, refresh the workspace lockfile, and keep the Den web build wiring explicit for CI and Docker.

* fix(den-web): build Den from the monorepo root on Vercel

Keep the shared utils package setup, but make Vercel install and build from the repo root so workspace dependencies like @openwork-ee/utils are always available when Den web deploys from its app subdirectory.

* docs(den-web): keep Vercel workspace settings in the dashboard

Remove the app-level Vercel command override from the repo and document the monorepo install/build settings for the dashboard instead.

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
2026-04-03 11:44:02 -07:00
OpenWork Release Bot
b4309d4965 chore(aur): update PKGBUILD for 0.11.200 2026-04-03 15:22:47 +00:00
Benjamin Shafii
d6480b8b2d add stuff 2026-04-02 11:38:55 -07:00
OpenWork Release Bot
f0ee64a357 chore(aur): update PKGBUILD for 0.11.199 2026-04-02 02:19:27 +00:00
Source Open
4caf178048 feat(den): add skill hubs and restore den-db migrations (#1285)
* feat(den-db): add skill hub schema and own migrations

* feat(den-api): add skill hub org routes

* fix(den-db): restore drizzle migration workflow

Move the Docker Den service onto den-api and repair den-db's Drizzle metadata so skill hub migrations generate incrementally from the package.

* refactor(den-db): drop legacy org table aliases

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
2026-04-01 15:23:39 -07:00
OpenWork Release Bot
c2b8d7c925 chore(aur): update PKGBUILD for 0.11.198 2026-03-31 06:01:22 +00:00
OpenWork Release Bot
58e1a47b36 chore(aur): update PKGBUILD for 0.11.197 2026-03-31 05:21:52 +00:00
Source Open
a3d6b17a19 fix(share): lock bundle fetches to the configured publisher (#1241)
Keep server-side share publish and fetch traffic on the configured OpenWork publisher so bundle links cannot steer host requests to arbitrary targets. Add a warning-backed client-side fallback for manual imports from untrusted bundle URLs.

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
2026-03-30 17:38:31 -07:00
OpenWork Release Bot
1600702bbe chore(aur): update PKGBUILD for 0.11.196 2026-03-30 21:28:01 +00:00
OpenWork Release Bot
b65215014b chore(aur): update PKGBUILD for 0.11.195 2026-03-27 22:03:34 +00:00
ben
783774d295 fix(den): trust 0.0.0.0 local auth origin (#1192) 2026-03-27 10:36:25 -07:00
OpenWork Release Bot
42c0b7b82a chore(aur): update PKGBUILD for 0.11.194 2026-03-26 20:46:46 +00:00
Benjamin Shafii
3e2cd73523 new dev 2026-03-26 11:26:16 -07:00
OpenWork Release Bot
4ea40f49da chore(aur): update PKGBUILD for 0.11.193 2026-03-26 05:23:52 +00:00
Source Open
21d3b443a7 Add Den organizations, org permissions, and template sharing surfaces (#1172)
* Add Den org auth model and template APIs

Wire Better Auth organizations with TypeId-backed schema and migrations, enforce owner/admin org permissions, and add org-scoped template create/list/delete endpoints. Simplify the Den org dashboard UX and update Docker dev packaging paths for the ee apps/packages layout.

* Add manual-safe org migration SQL

Provide a Vitess-compatible version of the organization migration without statement-breakpoint markers or unsupported IF NOT EXISTS column syntax so operators can run it directly in SQL consoles.

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
2026-03-25 18:30:50 -07:00
Source Open
8c143ab2a3 fix(domain): switch hosted URLs to openworklabs (#1150) 2026-03-25 18:02:44 -07:00
OpenWork Release Bot
b0fd278dbe chore(aur): update PKGBUILD for 0.11.192 2026-03-25 22:31:14 +00:00
Fizza Mukhtar
2f277dcb72 fix(aur): handle /usr/bin/opencode conflict with opencode-bin package (#1165)
* fix(aur): remove bundled opencode binary when opencode-bin is installed

* fix(aur): always drop packaged /usr/bin/opencode

---------

Co-authored-by: Benjamin Shafii <ben@prologe.io>
2026-03-25 07:42:23 -07:00
OpenWork Release Bot
d5231baefa chore(aur): update PKGBUILD for 0.11.191 2026-03-25 01:05:20 +00:00
OpenWork Release Bot
de2f934a2c chore(aur): update PKGBUILD for 0.11.190 2026-03-24 23:32:59 +00:00
OpenWork Release Bot
6cbfcf5a45 chore(aur): update PKGBUILD for 0.11.189 2026-03-24 17:16:59 +00:00
OpenWork Release Bot
fecdde2c24 chore(aur): update PKGBUILD for 0.11.187 2026-03-24 15:09:43 +00:00
OpenWork Release Bot
254471c8c3 chore(aur): update PKGBUILD for 0.11.186 2026-03-24 06:17:01 +00:00
OpenWork Release Bot
b3278b107e chore(aur): update PKGBUILD for 0.11.185 2026-03-24 05:34:36 +00:00
Source Open
18723ec767 feat(security): default local workers to localhost only (#1132)
Require generated OpenCode auth and explicit remote-sharing opt-in so local workers stay loopback-only unless the user intentionally exposes them.
2026-03-23 17:58:53 -07:00
Source Open
24c47f190b fix(den): harden public auth and publishing surfaces (#1128)
* fix(den): harden public auth and publishing surfaces

* fix(den-db): write migrations to den-controller drizzle dir

\
2026-03-23 17:58:15 -07:00
OpenWork Release Bot
15a70c9229 chore(aur): update PKGBUILD for 0.11.184 2026-03-23 15:05:19 +00:00
OpenWork Release Bot
5c85142098 chore(aur): update PKGBUILD for 0.11.182 2026-03-23 01:50:29 +00:00
OpenWork Release Bot
32a26852e4 chore(aur): update PKGBUILD for 0.11.181 2026-03-22 17:03:08 +00:00
OpenWork Release Bot
6d84a139dc chore(aur): update PKGBUILD for 0.11.178 2026-03-22 03:11:40 +00:00
OpenWork Release Bot
c7aeb40af4 chore(aur): update PKGBUILD for 0.11.177 2026-03-20 20:55:25 +00:00
OpenWork Release Bot
d948631b5a chore(aur): update PKGBUILD for 0.11.175 2026-03-20 05:54:18 +00:00
OpenWork Release Bot
550989527b chore(aur): update PKGBUILD for 0.11.173 2026-03-20 05:15:18 +00:00
OpenWork Release Bot
26042d9303 chore(aur): update PKGBUILD for 0.11.173 2026-03-20 01:41:05 +00:00
Omar McAdam
5cdf86b120 feat(den): add Daytona worker activity heartbeats and release snapshot automation (#1045)
* feat(den): add daytona activity heartbeats and snapshot release automation

* ci: run Daytona snapshot publish from release workflow

---------

Co-authored-by: Omar McAdam <omar@OpenWork-Studio.localdomain>
2026-03-19 15:38:11 -07:00
Omar McAdam
2b91b4d777 refactor: repo folder structure (#1038)
* refactor(repo): move OpenWork apps into apps and ee layout

Rebase the monorepo layout migration onto the latest dev changes so the moved app, desktop, share, and cloud surfaces keep working from their new paths. Carry the latest deeplink, token persistence, build, Vercel, and docs updates forward to avoid stale references and broken deploy tooling.

* chore(repo): drop generated desktop artifacts

Ignore the moved Tauri target and sidecar paths so local cargo checks do not pollute the branch. Remove the accidentally committed outputs from the repo while keeping the layout migration intact.

* fix(release): drop built server cli artifact

Stop tracking the locally built apps/server/cli binary so generated server outputs do not leak into commits. Also update the release workflow to check the published scoped package name for @openwork/server before deciding whether npm publish is needed.

* fix(workspace): add stable CLI bin wrappers

Point the server and router package bins at committed wrapper scripts so workspace installs can create shims before dist outputs exist. Keep the wrappers compatible with built binaries and source checkouts to avoid Vercel install warnings without changing runtime behavior.
2026-03-19 11:41:38 -07:00
ben
16536e50b2 fix(docker): expose dev stacks on LAN and Tailscale (#1009) 2026-03-17 19:48:11 -07:00
Omar McAdam
abc5559d8a fix(den): hide mobile rename summary and repair docker startup (#1001)
Keep the worker rename step focused on small screens, and point the Den Docker services at their built entrypoints so the onboarding flow can be verified end to end.
2026-03-17 17:30:15 -07:00
OpenWork Release Bot
d0dec30463 chore(aur): update PKGBUILD for 0.11.169 2026-03-18 00:12:35 +00:00
OpenWork Release Bot
ef8a512f66 chore(aur): update PKGBUILD for 0.11.168 2026-03-17 06:28:10 +00:00