unoverse 0.1.30 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -245,11 +245,33 @@ cmd_init() {
245
245
  # OpenAI (for Memory Server)
246
246
  local cur_oai
247
247
  cur_oai=$(_env_cur OPENAI_API_KEY)
248
+ # NOT just the memory server: compose hands this to the unoverse service itself —
249
+ # agents, embeddings and memory all run on it. A universe boots without it, but its AI
250
+ # does not, so skipping gets a warning rather than silence.
248
251
  if [ -n "$cur_oai" ]; then
249
252
  read -p " OPENAI_API_KEY [keep current]: " OPENAI_API_KEY
250
253
  OPENAI_API_KEY="${OPENAI_API_KEY:-$cur_oai}"
251
254
  else
252
- read -p " OPENAI_API_KEY (for Memory Server, blank to skip): " OPENAI_API_KEY
255
+ read -p " OPENAI_API_KEY (powers the platform's AI): " OPENAI_API_KEY
256
+ [ -z "$OPENAI_API_KEY" ] && warn "No OpenAI key: the universe starts, but agents, embeddings and memory will not work until one is in .env"
257
+ fi
258
+
259
+ # Node vendor keys, OPTIONAL: only the matching nodes need them, nothing platform-level
260
+ # does. Asked so compose stops warning about them and so they land in .env with names.
261
+ local cur_hb cur_sa
262
+ cur_hb=$(_env_cur HYPERBROWSER_API_KEY)
263
+ if [ -n "$cur_hb" ]; then
264
+ read -p " HYPERBROWSER_API_KEY [keep current]: " HYPERBROWSER_API_KEY
265
+ HYPERBROWSER_API_KEY="${HYPERBROWSER_API_KEY:-$cur_hb}"
266
+ else
267
+ read -p " HYPERBROWSER_API_KEY (browser nodes, blank to skip): " HYPERBROWSER_API_KEY
268
+ fi
269
+ cur_sa=$(_env_cur SEARCHAPI_KEY)
270
+ if [ -n "$cur_sa" ]; then
271
+ read -p " SEARCHAPI_KEY [keep current]: " SEARCHAPI_KEY
272
+ SEARCHAPI_KEY="${SEARCHAPI_KEY:-$cur_sa}"
273
+ else
274
+ read -p " SEARCHAPI_KEY (web-search nodes, blank to skip): " SEARCHAPI_KEY
253
275
  fi
254
276
 
255
277
  # Write .env
@@ -268,6 +290,8 @@ AUTH_CLIENT_ID=${AUTH_CLIENT_ID}
268
290
  AUTH_AUDIENCE=${AUTH_AUDIENCE}
269
291
  API_URL=${API_URL}
270
292
  OPENAI_API_KEY=${OPENAI_API_KEY}
293
+ HYPERBROWSER_API_KEY=${HYPERBROWSER_API_KEY}
294
+ SEARCHAPI_KEY=${SEARCHAPI_KEY}
271
295
  DOMAIN=
272
296
  ENVEOF
273
297
 
@@ -302,11 +326,14 @@ ENVEOF
302
326
  # A database that is not reachable yet is not a failed setup — .env is written and
303
327
  # correct, so say so and move on rather than unwinding everything.
304
328
  echo ""
329
+ # SUBSHELL, deliberately: cmd_db_setup exits on "services not up yet", and an exit in a
330
+ # sourced function would take all of init with it — setup then reported failure for a
331
+ # situation that just means "migrations run on start". Which they now do (start.sh).
305
332
  if grep -q '^DATABASE_URL=' "$ROOT/.env" 2>/dev/null; then
306
- if cmd_db_setup; then
333
+ if (cmd_db_setup); then
307
334
  ok "Database schema is up to date"
308
335
  else
309
- warn "Could not reach the database yet. Run ${BOLD}unoverse check${NC} once it is up"
336
+ info "Migrations wait for the platform: ${BOLD}unoverse start${NC} applies them once services are up"
310
337
  fi
311
338
  fi
312
339
 
@@ -322,5 +349,6 @@ ENVEOF
322
349
  echo -e " ${GREEN}unoverse where${NC} Its addresses, once it is up"
323
350
  echo ""
324
351
  info "Run ${BOLD}unoverse check${NC} anytime to see if it is healthy"
352
+ info "Change a setting any time: edit ${BOLD}.env${NC} directly, or re-run ${BOLD}unoverse create${NC} (Enter keeps each current value)"
325
353
  echo ""
326
354
  }
@@ -137,6 +137,13 @@ cmd_start() {
137
137
  # Generates + tsc-builds nodes/components, then reloads unoverse so they load.
138
138
  # Non-fatal: build_component_nodes returns (doesn't exit) if it can't run, so start still finishes.
139
139
  build_component_nodes
140
+ # Migrations, now that the unoverse service is up (they run from inside its
141
+ # container). This is what makes start the resume point after any interrupted
142
+ # setup: pull, boot, migrate, no third command to know. Subshell for the same
143
+ # reason init uses one: cmd_db_setup exits rather than returns on failure.
144
+ if ! (cmd_db_setup) >/dev/null 2>&1; then
145
+ warn "Migrations did not apply. Run ${BOLD}unoverse check${NC} to see why"
146
+ fi
140
147
  print_access_urls
141
148
  echo ""
142
149
  info "Run ${BOLD}unoverse open${NC} to open Canvas in your browser"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",