unoverse 0.1.31 → 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.
@@ -256,6 +256,24 @@ cmd_init() {
256
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
257
  fi
258
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
275
+ fi
276
+
259
277
  # Write .env
260
278
  cat > "$ROOT/.env" << ENVEOF
261
279
  # Generated by unoverse init
@@ -272,6 +290,8 @@ AUTH_CLIENT_ID=${AUTH_CLIENT_ID}
272
290
  AUTH_AUDIENCE=${AUTH_AUDIENCE}
273
291
  API_URL=${API_URL}
274
292
  OPENAI_API_KEY=${OPENAI_API_KEY}
293
+ HYPERBROWSER_API_KEY=${HYPERBROWSER_API_KEY}
294
+ SEARCHAPI_KEY=${SEARCHAPI_KEY}
275
295
  DOMAIN=
276
296
  ENVEOF
277
297
 
@@ -306,11 +326,14 @@ ENVEOF
306
326
  # A database that is not reachable yet is not a failed setup — .env is written and
307
327
  # correct, so say so and move on rather than unwinding everything.
308
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).
309
332
  if grep -q '^DATABASE_URL=' "$ROOT/.env" 2>/dev/null; then
310
- if cmd_db_setup; then
333
+ if (cmd_db_setup); then
311
334
  ok "Database schema is up to date"
312
335
  else
313
- 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"
314
337
  fi
315
338
  fi
316
339
 
@@ -326,5 +349,6 @@ ENVEOF
326
349
  echo -e " ${GREEN}unoverse where${NC} Its addresses, once it is up"
327
350
  echo ""
328
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)"
329
353
  echo ""
330
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.31",
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",