unoverse 0.1.145 → 0.1.147

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.
@@ -17,3 +17,12 @@ become = True
17
17
  become_method = sudo
18
18
  become_user = root
19
19
  become_ask_pass = False
20
+
21
+ [ssh_connection]
22
+ # A transient TCP timeout must not kill a deploy: a single dropped SYN to a busy
23
+ # or far-away VM read as UNREACHABLE on the very first task. Retry the connect
24
+ # (ConnectionAttempts) and the connection (retries) before declaring the host gone.
25
+ # The -C/ControlMaster/ControlPersist flags are ansible's defaults, restated
26
+ # because ssh_args REPLACES them rather than appending.
27
+ ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectionAttempts=5 -o ConnectTimeout=15 -o ServerAliveInterval=15 -o ServerAliveCountMax=4
28
+ retries = 3
@@ -112,6 +112,19 @@ locals {
112
112
  # Where a person actually goes. Shared by the invitation email and the canvas_url output
113
113
  # so the address in the email can never drift from the address in the deploy summary.
114
114
  canvas_entry = var.domain != "" ? "https://canvas.${var.domain}" : "http://${aws_lb.public.dns_name}:3001"
115
+ # STUDIO IS A CALLBACK THIS GROUND OWNS, exactly like canvas_entry above.
116
+ #
117
+ # Studio signs in with `redirect_uri: window.location.origin` (packages/studio
118
+ # src/UniverseSession.tsx) and serves on a pinned 4108 (vite.config.ts, strictPort). On a
119
+ # BYO-OIDC ground the operator adds that to their own tenant; here the app client IS a
120
+ # resource of this module, so leaving it out means every developer who connects Studio to
121
+ # an AWS universe meets `redirect_mismatch` and has to discover a port number to put in a
122
+ # variable. The ground knows the address, so the ground allows it.
123
+ #
124
+ # Loopback only. It grants nothing on its own: the client is public, the flow is code with
125
+ # PKCE, and a code returned to 127.0.0.1 is redeemable only by the process that asked for
126
+ # it. The same reasoning already ships localhost:5173 in terraform.tfvars.example.
127
+ studio_entry = "http://localhost:4108"
115
128
  api_host = "api.${var.domain}"
116
129
  dns_auto = local.has_domain && var.route53_zone_id != ""
117
130
  }
@@ -592,8 +605,8 @@ resource "aws_cognito_user_pool_client" "spa" {
592
605
  # canvas_entry is the same expression the invitation email and the canvas_url output use,
593
606
  # so the address a person is sent to is by construction an address they may return to.
594
607
  # Anything else in the variable (localhost for dev, a second front end) is kept.
595
- callback_urls = distinct(concat([local.canvas_entry], var.oauth_callback_urls))
596
- logout_urls = distinct(concat([local.canvas_entry], var.oauth_callback_urls))
608
+ callback_urls = distinct(concat([local.canvas_entry, local.studio_entry], var.oauth_callback_urls))
609
+ logout_urls = distinct(concat([local.canvas_entry, local.studio_entry], var.oauth_callback_urls))
597
610
  supported_identity_providers = ["COGNITO"]
598
611
  }
599
612
 
@@ -30,9 +30,12 @@ docr_token = "dop_v1_..." # registry token (pulls platform images)
30
30
  openai_api_key = "sk-..." # memory server + OpenAI nodes
31
31
  # hyperbrowser_api_key = "" # optional — page intelligence
32
32
 
33
+ # EXTRA sign-in callbacks only. Your Canvas (canvas.<domain>, or the ALB address when
34
+ # there is no domain) and Studio (http://localhost:4108) are allowed automatically — the
35
+ # ground provisions the app client, so it knows those two addresses and adds them itself.
36
+ # List anything else here: a second front end, another dev port.
33
37
  oauth_callback_urls = [
34
- "https://yourdomain.com",
35
- "http://localhost:5173", # local Studio/Canvas dev against this universe
38
+ "http://localhost:5173", # Canvas dev server
36
39
  ]
37
40
 
38
41
  # RBAC roles (noun:verb — the grammar node manifests' requires.role matches).
@@ -819,8 +819,20 @@ EOF
819
819
  # never been migrated, and reported success. The stamp is written only after install,
820
820
  # database and verify have all passed, so an interrupted setup resumes as a setup.
821
821
  if [ -z "$subcommand" ]; then
822
- if ! ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 \
823
- "$deploy_user@$deploy_host" 'test -f /opt/gravity/.setup-complete' >/dev/null 2>&1; then
822
+ # "COULD NOT ASK" IS NOT "NOT SET UP". ssh exits 255 on a connection failure and
823
+ # with the remote command's status otherwise — and a transient timeout here once
824
+ # reclassified a healthy, deployed server as first-time, pointing a full install at
825
+ # it. Retry the connect, and if the host still cannot be reached, stop and say so
826
+ # rather than guessing what it is.
827
+ local stamp_probe=0
828
+ ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 \
829
+ -o ConnectionAttempts=5 \
830
+ "$deploy_user@$deploy_host" 'test -f /opt/gravity/.setup-complete' >/dev/null 2>&1 || stamp_probe=$?
831
+ if [ "$stamp_probe" -eq 255 ]; then
832
+ rm -f "$tmp_inventory"
833
+ fail "Cannot reach $deploy_user@$deploy_host over SSH (tried 5 times). Check the network / security-group admin rule, then: unoverse deploy $cloud"
834
+ exit 1
835
+ elif [ "$stamp_probe" -ne 0 ]; then
824
836
  echo ""
825
837
  info "This server's setup has not finished. Running it ${DIM}(install, database, verify)${NC}"
826
838
  subcommand="first-time"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.145",
3
+ "version": "0.1.147",
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",