unoverse 0.1.127 → 0.1.129

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.
@@ -600,13 +600,27 @@ resource "aws_cognito_user_pool_domain" "domain" {
600
600
  # NOTE: the secret lands in Terraform state — acceptable at POC, noted in the doc.
601
601
  # Model ACCESS is enabled in the console per model/region, outside Terraform.
602
602
 
603
+ # OPTIONAL, because it is the only thing here that needs IAM write and nothing reads it.
604
+ #
605
+ # The platform never uses these keys. They exist as OUTPUTS, for a developer to paste into
606
+ # the Credentials UI, exactly as they would an OpenAI key. So a universe that does not use
607
+ # the Bedrock nodes was minting a permanent access key for nobody, and paying for it in the
608
+ # one place that matters: `iam:CreateUser` is excluded from AWS's PowerUserAccess policy, so
609
+ # in any managed account this single resource turns a working deploy into a request to
610
+ # somebody's cloud team.
611
+ #
612
+ # DEFAULT TRUE, deliberately. Flipping it to false would DESTROY the user and key in every
613
+ # universe that already has one, and silently break Bedrock for anyone who had pasted those
614
+ # keys into a credential. Set it false where IAM write is not delegated.
603
615
  resource "aws_iam_user" "bedrock" {
604
- name = "${var.name}-bedrock-invoke"
616
+ count = var.bedrock_credentials ? 1 : 0
617
+ name = "${var.name}-bedrock-invoke"
605
618
  }
606
619
 
607
620
  resource "aws_iam_user_policy" "bedrock" {
608
- name = "bedrock-invoke-only"
609
- user = aws_iam_user.bedrock.name
621
+ count = var.bedrock_credentials ? 1 : 0
622
+ name = "bedrock-invoke-only"
623
+ user = aws_iam_user.bedrock[0].name
610
624
  policy = jsonencode({
611
625
  Version = "2012-10-17"
612
626
  Statement = [{
@@ -637,7 +651,8 @@ resource "aws_iam_user_policy" "bedrock" {
637
651
  }
638
652
 
639
653
  resource "aws_iam_access_key" "bedrock" {
640
- user = aws_iam_user.bedrock.name
654
+ count = var.bedrock_credentials ? 1 : 0
655
+ user = aws_iam_user.bedrock[0].name
641
656
  }
642
657
 
643
658
  # ── Native ingress (2026-07-29): ONE ALB, host-routed — the thing DO's LB can't
@@ -71,12 +71,12 @@ output "cognito_hosted_ui" {
71
71
 
72
72
  output "bedrock_access_key_id" {
73
73
  description = "Store as a platform awsCredential (accessKeyId) for the Bedrock/Nova nodes"
74
- value = aws_iam_access_key.bedrock.id
74
+ value = one(aws_iam_access_key.bedrock[*].id)
75
75
  }
76
76
 
77
77
  output "bedrock_secret_access_key" {
78
78
  description = "Store as a platform awsCredential (secretAccessKey)"
79
- value = aws_iam_access_key.bedrock.secret
79
+ value = one(aws_iam_access_key.bedrock[*].secret)
80
80
  sensitive = true
81
81
  }
82
82
 
@@ -117,3 +117,16 @@ variable "operator_public_key" {
117
117
  type = string
118
118
  default = ""
119
119
  }
120
+
121
+ # Whether to create the Bedrock IAM user and access key (main.tf, "Bedrock").
122
+ #
123
+ # TRUE preserves what every existing universe already has. FALSE skips the only resource
124
+ # here that needs IAM write, which is what makes a deploy possible in an account where
125
+ # `iam:CreateUser` is not delegated. Nothing in the platform reads the keys: they are
126
+ # outputs, for pasting into a credential, so switching this off costs a manual step and
127
+ # nothing else.
128
+ variable "bedrock_credentials" {
129
+ type = bool
130
+ default = true
131
+ description = "Create an IAM user and access key for the Bedrock nodes. Set false where IAM write is not delegated."
132
+ }
@@ -88,7 +88,7 @@ cmd_db_verify() {
88
88
  ],
89
89
  dictionary_need_states: [
90
90
  "universal_id", "content_hash", "title", "description", "object_type",
91
- "needs", "source_url", "umap_x", "umap_y", "umap_z",
91
+ "needs", "source_url", "source_id", "umap_x", "umap_y", "umap_z",
92
92
  "umap_cluster_id", "color_hex", "needs_umap_update", "created_at",
93
93
  "updated_at", "workflow_id", "key_need", "metadata", "embedding_original"
94
94
  ],
@@ -30,6 +30,22 @@ else
30
30
  exit 1
31
31
  fi
32
32
 
33
+ # True when the CURRENT DIRECTORY sits inside the platform monorepo. Deliberately keyed to
34
+ # $PWD and not to this script's location: the case it exists for is the INSTALLED CLI being
35
+ # run from inside this repo, where the script lives in node_modules and only the cwd says
36
+ # where the user actually is. The root package name is the marker, and no starter kit
37
+ # carries it.
38
+ _in_platform_monorepo() {
39
+ local d="$PWD"
40
+ while [ "$d" != "/" ] && [ -n "$d" ]; do
41
+ if [ -f "$d/package.json" ] && grep -q '"name"[[:space:]]*:[[:space:]]*"unoverse-platform"' "$d/package.json" 2>/dev/null; then
42
+ return 0
43
+ fi
44
+ d="$(dirname "$d")"
45
+ done
46
+ return 1
47
+ }
48
+
33
49
  # ── Source all modules ──────────────────────────────────────────────
34
50
  source "$GRAVITY_LIB/find-root.sh"
35
51
  source "$GRAVITY_LIB/common.sh"
@@ -154,6 +170,25 @@ case "${1:-}" in
154
170
  shift 2; node --import tsx "$GRAVITY_LIB/publish-assets.mjs" "$@"
155
171
  elif type cmd_publish >/dev/null 2>&1; then
156
172
  shift; cmd_publish "$@"
173
+ elif _in_platform_monorepo; then
174
+ # THE INSTALLED CLI CANNOT RELEASE THE PLATFORM, and inside this repo the fallthrough
175
+ # below is never what anyone meant: it would start publishing rx assets to a universe
176
+ # while the operator believes they are shipping the platform. It used to do exactly
177
+ # that, silently, which is the whole reason this branch exists. Refuse and say where
178
+ # to go. A starter kit never reaches here (no `unoverse-platform` package above it),
179
+ # so the developer publish keeps working untouched.
180
+ echo "" >&2
181
+ echo " The unoverse CLI does not release the platform." >&2
182
+ echo "" >&2
183
+ echo " You are inside the platform monorepo, where \`publish\` would publish rx" >&2
184
+ echo " ASSETS to a universe — not ship the platform. The release lives in this" >&2
185
+ echo " repo's own script, which the published CLI does not carry:" >&2
186
+ echo "" >&2
187
+ echo " scripts/operator.sh publish" >&2
188
+ echo "" >&2
189
+ echo " See docs/architecture/DEVELOPER_GUIDE.md § Releasing." >&2
190
+ echo "" >&2
191
+ exit 1
157
192
  else
158
193
  shift; node --import tsx "$GRAVITY_LIB/publish-assets.mjs" "$@"
159
194
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.127",
3
+ "version": "0.1.129",
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",