0
Fork 0
mirror of https://github.com/oblien/openship.git synced 2026-11-18 06:55:56 +00:00
Commit graph

138 commits

Author SHA1 Message Date
Sibil Sarjam Soren
731e83d7c7
fix(cli): keep the running service's ports when openship up runs again (#1743)
* fix(cli): keep the running service's ports when `openship up` runs again

startService resolved ports without telling resolvePorts which ones the
running service already holds, so on a re-run they looked busy. It waited
out waitPortFree on each port (about 12s) and then moved the install to
the next pair, rewriting ports.json (7100/7200 became 7101/7201).

While the service is running, pass its stored ports as reclaimable, the
same way the compose path does with composeHeldPorts.

Refs #1570

* fix(cli): verify service-owned ports and align dry-run

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-13 19:00:35 +02:00
Johannes Rueschel
49fd139c81
fix(cli): use Node for container host-channel probe (#1745)
Co-authored-by: chbndrhnns <7534547+chbndrhnns@users.noreply.github.com>
2026-11-13 11:49:11 +02:00
Saim Shafique
057d65de7a
fix(deploy): let webhook and CLI deploys approve reviewed Compose changes (#1675)
* fix(deploy): let webhooks and CLI accept reviewed Compose changes

Webhook and CLI deploys hit COMPOSE_REVIEW_REQUIRED with no way through the gate, and the refusal hid what changed. Accept the current Compose source explicitly per deploy (--accept-compose-changes, or acceptComposeChanges on the hook), and surface the added/changed/removed services in the CLI error and the webhook delivery record.

* test(contracts): include acceptComposeChanges in deployment schema flags

The Compose review gate added acceptComposeChanges to
CreateDeploymentSchema without updating the contract test that
enumerates the schema's public flags, so the contracts suite failed
on CI. Add the flag to the expected list.

* docs(cli): list --accept-compose-changes in the deploy reference

The new deploy flag was missing from the generated CLI reference,
so docs:check failed with a stale reference. Add the row in
declaration order.

* Retain explicit Compose approval through shared deployment admission

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 18:57:58 +02:00
Hydra de lerne
da49936e06
fix(cli): recover failed updates and gate installed VPS releases (#1662)
* fix(cli): stream release downloads safely and gate real VPS updates

* fix(cli): recover update retries and gate installed release payloads

* test(release): include installed CLI gate in npm policy cases
2026-11-08 14:27:31 +02:00
Rudi
3d8ff5bbc7
feat(servers): configure build-cache budgets and fix migration progress (#1645)
* fix(build): scale the managed build-cache budget with the disk

The managed project-cache budget was min(5 GiB, 10% of the Docker
filesystem). A project whose BuildKit cache outgrew 5 GiB was evicted by
the post-build prune after every build, so every deploy started cold.

- buildCacheKeepBytes is now 20% of the Docker filesystem, so the budget
  follows the disk in both directions: disks under 50 GiB also move from
  10% to 20%. This also applies to managed Cloud workers, which share
  the collector.
- Below the 20% free-space GC target the idle budget shrinks to what
  still fits above it (never below the old min(5 GiB, 10%)), so idle
  caches give space back before rollback artifacts and running apps.
  BuildKit's own 20% minFreeSpace still bounds a running worker.
- pruneManagedBuildCaches defaults to that budget instead of 5 GiB.
- The daily sweep marks its call as automaticRetention, so managed caches
  use the same budget; keepStorageBytes still bounds native Docker cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(servers): configurable build-cache budget per server

Adds an optional managed build-cache budget for remote deployment
servers, edited from a Build cache card on the server Overview tab and
through the existing server update API, CLI and MCP tool. Empty keeps the
automatic share of the Docker filesystem.

- servers.build_cache_budget_bytes (migration 0224), bounded 1 GiB to
  64 TiB in the database and the API contract.
- Only remote deployment servers expose and accept it: the local row
  builds through the host daemon's native cache and migration sources
  never build, so updates there are refused; managed Cloud servers keep
  rejecting every field except name. Changing it requires server admin,
  since a large budget lets caches hold most of the disk.
- SSH Docker runtimes read the value through a new buildCacheBudgetBytes
  connection option on every collection, so a change applies to the next
  build without reconnecting. It sets the post-build prune budget,
  BuildKit's maxUsedSpace and the daily sweep's managed budget, capped at
  the filesystem minus the admission reserve and still reduced under
  storage pressure; a failed read falls back to automatic.
- Updates are audited like gpuOverride and do not drop retained SSH
  sessions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: regenerate the MCP and CLI references for the build-cache budget

The server update tool description and the `server configure` help now
mention the build-cache budget, so the generated references changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(migration): frame streamed rsync progress updates

* fix(migration): preserve exact progress with rsync byte units

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-07 20:23:30 +02:00
Hydra de lerne
9ab270c95c
feat(updates): add scoped host patches and observable advisory scans (#1566)
* feat(updates): allow workspace admins to pause runtime advisory checks

* fix(updates): repair upgrade fixture and reuse shared policy guards

* feat(updates): add scoped host patches and observable advisory scans

* fix(updates): report handled host maintenance failures

* fix(updates): load host advisory operations on demand

* refactor(updates): share server patch run lifecycle and logs

* test(cli): align compose sync with namespace isolation

* test(mail): exercise support delivery over verified TLS
2026-11-03 19:37:18 +02:00
Mohamed A. Abdel Fattah
4b13755cee
Merge commit from fork
* fix(security): gate local source contents by instance authority

Local-source preparation with includeEnv and local project scan/import read server-side files. Outside the native runtime, project write alone must not expose those values; require the persisted instance role. Native sourceRoots confinement keeps its existing member access.

* fix(cloud): require a terminal code for device connect consent

The headless CLI device flow trusted an arbitrary `state` from the URL, so a signed-in user could approve an attacker's pending request with one click and hand over a 30-day linked-instance session.

Issue a signed, expiring state plus a short user code from the new POST /api/cloud/device-authorize. connect-handoff rejects unsigned or expired device states, and connect-authorize requires the code bound to that state and PKCE challenge before minting. The CLI prints the code; the consent page asks the user to type it. The browser-redirect connect flow is unchanged.

* refactor(cloud): keep device consent validation self-contained

* refactor(auth): share Better Auth session lifecycle across bridges

* fix(auth): preserve issued lifetimes for bearer sessions

* fix(auth): read live sessions for connection approval

* test(auth): cover HTTP bearer and browser session handling

* test(auth): exercise device approval through Better Auth sessions

* fix(auth): share Cloud approval validation and consume requests once

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-03 17:06:53 +02:00
Hydra
1c726e6f1a feat: add scoped AI agents, automations and chat apps 2026-11-01 20:29:07 +02:00
Hydra
a7556c4b45 fix(updates): restore Compose readiness and preflight security actions
Cover full published-stack upgrades, retained data and signed sessions, cold restart and fresh installation. Reuse runtime preflight in advisory views and expose source-redeploy prerequisites. Refs #1461 and #1462.
2026-10-24 19:51:21 +03:00
Hydra
52dc66b6b0 fix(edge): refresh route protection integration and private rollback 2026-10-22 18:54:00 +03:00
Hydra
7753ed94cd Merge remote-tracking branch 'refs/remotes/origin/swarm-combined-main-20261022' into feat/swarm-combined-20261022
# Conflicts:
#	apps/api/src/modules/system/server-management.routes.ts
#	packages/adapters/src/index.ts
#	packages/db/drizzle/meta/_journal.json
2026-10-22 17:12:15 +03:00
Hydra de lerne
ed662afe73
Merge pull request #1328 from chbndrhnns/fix/tarball-update-compose-reconcile
fix(cli): force-recreate compose services during composeUpdate
2026-10-22 17:07:40 +03:00
Hydra
edcaa8cd1f fix(tokens): enforce capability scope across deployment operations 2026-10-22 13:57:13 +03:00
Hydra de lerne
f2aa422899
Merge pull request #1397 from oblien/feat/manage-and-cloud-plans
feat(billing): add Manage plans for customer-owned infrastructure
2026-10-22 13:10:29 +03:00
Fatih C. Akyon
2de5cfd553 fix: use Node for API container health checks 2026-10-22 11:49:13 +03:00
Hydra
b4499b90d9 fix(billing): integrate current main and tenant isolation guards 2026-10-22 07:42:32 +03:00
Hydra
22eefc7d25 feat(deployments): retry completed Docker builds without rebuilding 2026-10-21 21:46:37 +03:00
Hydra
bc796d0d4f fix(manage): enforce tenant isolation across hosted server operations 2026-10-21 20:52:31 +03:00
Hydra
c2ed05c20e feat(billing): complete Manage clients and hosted certificate checks 2026-10-21 16:56:06 +03:00
Hydra
1a6ebef7af chore(edge): stack route protection on Swarm inspection 2026-10-21 03:50:53 +03:00
Hydra
2fd3c09d65 feat(swarm): deploy projects through the shared cluster lifecycle 2026-10-21 03:26:33 +03:00
Hydra
b752089aee feat(swarm): inspect existing clusters and protect scheduler-owned workloads 2026-10-21 01:34:28 +03:00
Hydra
f245093011 feat(edge): add password-protected self-hosted routes 2026-10-20 15:03:41 +03:00
Hydra
48bdcd385d fix(cli): wait for recreated Compose update services 2026-10-18 12:27:20 +03:00
chbndrhnns
00192614c6 fix(cli): force-recreate compose services during composeUpdate 2026-10-17 19:24:47 +00:00
Rudi
7fb0a5f847 fix(analytics): divide self-hosted response-time sums by request count
The edge stores server_analytics.response_time as the TOTAL response time of
each minute's requests: site_logger.lua adds every request's time to the
minute's `:t` counter and mgmt_api.lua returns that sum in seconds.

summariseBuckets and buildHourlyPeriods treated the value as a per-minute
average and multiplied it by `requests` again, so the dashboard's Avg Response
grew with traffic: a busy site averaging ~80 ms reported ~7 s. The CLI edge
traffic panel averaged the per-minute totals, which overstated it too.

Divide the summed time by total requests, matching the Cloud path
(response_time_sum / requests), and correct the schema comment that described
the column as an average.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:58:10 +00:00
DrMxrcy
aa8290575b
feat(permissions): fine-grained token capabilities beside read/write/admin
Scoped token grants can carry capabilities in permissions, held on a
project: domains:read|write|delete and deployments:read|trigger. Route tags
map onto them through one table in @repo/core, and the permission check
accepts the root grant when its level permits the action or it holds the
mapped capability. Levels are unchanged and imply the same capabilities.

Mint checks the minter's reach per capability and rejects a capability on
the wrong type. MCP tools/list advertises tools by held capability. The CLI
--grant parser keeps the capability's colon.
2026-10-17 03:41:40 -04:00
Hydra
12800905ad feat(roles): apply runtime role configuration without rebuilding web 2026-10-17 02:22:31 +03:00
Hydra
979e83b9ca fix(projects): expose active runtime roles and replica logs 2026-10-16 23:58:10 +03:00
Hydra
b6281f99ae feat(ingress): manage server Cloudflare tunnels, DNS and Access 2026-10-15 14:25:00 +03:00
Hydra
9b3b70d212 feat(settings): add portable personal appearance editor 2026-10-15 11:33:15 +03:00
Mohamed Farahat
5c74b2e654 fix(cli): route domains added from the CLI
CLI domain registration created rows without routing targets.
Attach custom public endpoints through the shared project update flow,
mirroring the dashboard while preserving existing routes.

Fixes #1021
2026-10-15 03:33:04 +03:00
Hydra
f68fc50579 fix(billing): continue pricing selections directly to checkout 2026-10-14 03:19:58 +03:00
Hydra
56387559b5 feat(monitoring): clear resolved history with scoped confirmation 2026-10-13 21:11:02 +03:00
Hydra
f26ef755a2 Merge current main into release integration 2026-10-12 16:20:30 +03:00
Hydra de lerne
eddcb203f6
Merge pull request #1130 from Metehan-Bicer/fix/cli-api-path-and-env-set
fix(cli): accept /api paths, positional env pairs, and hint at login on 401
2026-10-11 18:12:41 +03:00
Hydra
36e0190d64 Merge main and regenerate the combined MCP reference 2026-10-11 16:26:11 +03:00
Hydra
87774503b9 feat(servers): add managed outbound controls and prioritize access 2026-10-11 16:06:12 +03:00
Metehan Biçer
e2a7273024 fix(cli): accept /api paths, positional env pairs, and hint at login on 401
`openship api /api/projects/<id>` requested /api/api/... because the
client always prefixes /api; a leading /api segment is now stripped.
`project env set <id> KEY=VALUE` failed with "too many arguments"; the
pairs are now accepted next to --set. A 401 from a project command now
adds "Run `openship login` first.", as server and service commands do.

Fixes #1023
2026-10-10 21:27:25 +03:00
Hydra
0c1ae9ee9d feat(actions): integrate workflows with projects and deployment rules 2026-10-10 02:23:49 +03:00
Hydra
ae6877920c feat(observability): unify structured error reporting
Route API, platform, deployment, background, Desktop, CLI and browser failures through a bounded redacting reporter with request and operation correlation. Preserve operation behavior and provider-specific credential sanitizers.

Add public browser intake, safe exporter and shutdown behavior, coverage audits in CI and release gates, and regression tests for correlation, privacy, stream semantics, backpressure and real API/browser delivery.
2026-10-09 08:10:45 +03:00
Hydra
a2e6a602cd merge: reconcile instance handoff with current main 2026-10-08 05:07:40 +03:00
Hydra
25a73a811a fix(cli): authenticate local administrators and guide remote login 2026-10-07 21:12:58 +03:00
Hydra
8c0d381787 feat(cli): cover Cloud and remote platform operations through the SDK 2026-10-07 17:33:10 +03:00
Hydra
cf00006fb9 feat: align Cloud billing and expand SDK-backed CLI operations 2026-10-04 21:49:27 +03:00
Hydra
445c07dfb8 fix(adapters): share explicit bounded container logging 2026-09-26 08:35:28 +03:00
Munal
57e83dc7d5 fix: prevent resource accumulation in OpenShip services 2026-09-26 10:18:11 +05:45
Hydra
ecbaad3994 update icon system, enhance backup 2026-09-25 13:53:12 +03:00
Hydra
b52691e742 Merge current main and harden Jobs CLI integration for PR #895 2026-09-23 09:48:26 +03:00
Fatih Akyon
e5bdce118a fix: merge latest main into jobs CLI branch 2026-09-16 12:56:19 +03:00