Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/adapters/hono/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ export function createHonoApp(options: ObjectStackHonoOptions): Hono {
// use a matcher function — Hono's cors() middleware does exact-string matching only and
// treats '*' in patterns as a literal character, so passing wildcard strings straight
// through would silently drop the Access-Control-Allow-Origin header on every real
// request (preflight can still succeed via apps/objectos's short-circuit, but the
// subsequent POST/GET would be blocked by the browser).
// request (preflight can still succeed via the short-circuit in `apps/objectos`,
// which lives in the separate `objectstack-ai/cloud` repo and is NOT a path in
// this one, but the subsequent POST/GET would be blocked by the browser).
//
// This mirrors `plugin-hono-server`'s CORS wiring and uses the shared pattern matcher
// from `@objectstack/plugin-hono-server` so all Hono-based code paths stay in sync.
Expand Down
25 changes: 13 additions & 12 deletions packages/cli/src/commands/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4063,9 +4063,9 @@ export default class Serve extends Command {
// • `requires: ['ai-studio']` ⇒ required → fail-fast if the private package
// is absent (an app that advertises Studio must ship it).
// • package declared but not required ⇒ auto (best-effort).
// • otherwise ⇒ skip — this is the control-plane host path (apps/cloud ships
// no Studio and MUST boot clean, cloud#107): not declared + not required
// ⇒ no import, no error.
// • otherwise ⇒ skip — this is the control-plane host path (such a host
// ships no Studio and MUST boot clean, cloud#107): not declared + not
// required ⇒ no import, no error.
if (aiLoaded) {
const hasAIStudio = plugins.some(
(p: any) => p.name === 'com.objectstack.service-ai-studio'
Expand Down Expand Up @@ -4397,9 +4397,9 @@ export default class Serve extends Command {

if (enableUI) {
// Pre-detect Console availability. The `--no-console` flag (or
// OS_DISABLE_CONSOLE=1 env var) lets a host (e.g. apps/cloud)
// opt out of the Console entirely — useful for control-plane
// deployments where the runtime Console is meaningless.
// OS_DISABLE_CONSOLE=1 env var) lets a host opt out of the Console
// entirely — useful for control-plane deployments where the
// runtime Console is meaningless.
const consoleEnabled = flags.console && process.env.OS_DISABLE_CONSOLE !== '1';
// Resolution reports objectui-SHA drift instead of warning about it
// itself, so the decision below owns the single message about it.
Expand Down Expand Up @@ -4546,12 +4546,13 @@ export default class Serve extends Command {

// ── Migrate-and-exit short-circuit ─────────────────────────────
// Out-of-band migration mode: the caller (e.g.
// `apps/cloud/scripts/migrate.ts`) just wants the kernel
// bootstrap (ObjectQLPlugin → schema sync → metadata hydration)
// to run once against the configured database, then exit. The
// HTTP server has already bound `port` at this point but we
// never accept a request — shutdown immediately so the deploy
// pipeline can move on.
// `apps/cloud/scripts/migrate.ts`, which lives in the separate
// `objectstack-ai/cloud` repo and is NOT a path in this one) just
// wants the kernel bootstrap (ObjectQLPlugin → schema sync →
// metadata hydration) to run once against the configured database,
// then exit. The HTTP server has already bound `port` at this point
// but we never accept a request — shutdown immediately so the
// deploy pipeline can move on.
if (process.env.OS_MIGRATE_AND_EXIT === '1') {
// This path exits before the banner, so it has to replay the boot
// diagnostics itself — a deploy pipeline is precisely where a
Expand Down
6 changes: 4 additions & 2 deletions packages/cloud-connection/src/cloud-connection-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
* GET /api/v1/cloud-connection/org-packages — owning org's own catalog ("Your organization")
*
* History: these routes started as app-level wiring in
* `apps/objectos/cloud-runtime-plugins.ts` (two ad-hoc plugins). ADR-0008
* Phase 1 consolidates them here as ONE plugin so both deployment shapes —
* `apps/objectos/cloud-runtime-plugins.ts` (two ad-hoc plugins; every
* `apps/` path named in this paragraph lives in the separate
* `objectstack-ai/cloud` repo, never in this one). ADR-0008 Phase 1
* consolidates them here as ONE plugin so both deployment shapes —
* `apps/objectos` (multi-tenant) and `apps/objectos-ee` (single-environment)
* — wire the same canonical implementation. ADR-0008 Phase 2 moves this
* surface into the open `@objectstack/cloud-connection` package; keep this
Expand Down
9 changes: 5 additions & 4 deletions packages/plugins/plugin-hono-server/src/pattern-matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
* These helpers are shared between the Hono plugin's CORS middleware and
* consumers that need to apply CORS headers outside the Hono request
* pipeline (e.g., the Vercel serverless entrypoint's preflight
* short-circuit in `apps/objectos`). Keeping a single implementation
* ensures both paths stay consistent — divergence caused bug where
* wildcard `CORS_ORIGIN` values worked locally but produced browser
* CORS errors on Vercel.
* short-circuit in `apps/objectos` — that app lives in the separate
* `objectstack-ai/cloud` repo, not in this one). Keeping a single
* implementation ensures both paths stay consistent — divergence caused
* bug where wildcard `CORS_ORIGIN` values worked locally but produced
* browser CORS errors on Vercel.
*/

/**
Expand Down
Loading