@caelo-cms/provisioning 0.10.57 → 0.10.58

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.
Files changed (68) hide show
  1. package/dist/agent-db.js +21 -5
  2. package/dist/compose.js +1 -1
  3. package/dist/infra-contract.d.ts +1 -1
  4. package/dist/infra-contract.d.ts.map +1 -1
  5. package/dist/infra-contract.js +12 -1
  6. package/dist/infra-contract.js.map +1 -1
  7. package/dist/operator-access.d.ts +4 -0
  8. package/dist/operator-access.d.ts.map +1 -1
  9. package/dist/operator-access.js +37 -11
  10. package/dist/operator-access.js.map +1 -1
  11. package/dist/remote-mcp.d.ts +22 -0
  12. package/dist/remote-mcp.d.ts.map +1 -1
  13. package/dist/remote-mcp.js +59 -4
  14. package/dist/remote-mcp.js.map +1 -1
  15. package/dist/runtime-secrets.js +2 -2
  16. package/dist/runtime-secrets.js.map +1 -1
  17. package/dist/stack-contract.d.ts +54 -15
  18. package/dist/stack-contract.d.ts.map +1 -1
  19. package/dist/stack-contract.js +80 -33
  20. package/dist/stack-contract.js.map +1 -1
  21. package/dist/stack-converge.d.ts +17 -2
  22. package/dist/stack-converge.d.ts.map +1 -1
  23. package/dist/stack-converge.js +52 -2
  24. package/dist/stack-converge.js.map +1 -1
  25. package/dist/upgrade/app-roll.d.ts.map +1 -1
  26. package/dist/upgrade/app-roll.js +3 -3
  27. package/dist/upgrade/app-roll.js.map +1 -1
  28. package/dist/upgrade/audit-job-roll.d.ts.map +1 -1
  29. package/dist/upgrade/audit-job-roll.js +3 -1
  30. package/dist/upgrade/audit-job-roll.js.map +1 -1
  31. package/dist/upgrade/converge.d.ts.map +1 -1
  32. package/dist/upgrade/converge.js +16 -5
  33. package/dist/upgrade/converge.js.map +1 -1
  34. package/dist/wizards/gcp-cost.js +1 -1
  35. package/dist/wizards/gcp-cost.js.map +1 -1
  36. package/dist/wizards/gcp-pulumi.d.ts +6 -0
  37. package/dist/wizards/gcp-pulumi.d.ts.map +1 -1
  38. package/dist/wizards/gcp-pulumi.js +14 -2
  39. package/dist/wizards/gcp-pulumi.js.map +1 -1
  40. package/dist/wizards/gcp.js +9 -2
  41. package/dist/wizards/gcp.js.map +1 -1
  42. package/package.json +2 -2
  43. package/src/audit-job-setup.test.ts +7 -1
  44. package/src/compose.ts +1 -1
  45. package/src/gateway-env-isolation.test.ts +1 -1
  46. package/src/infra-contract.test.ts +4 -3
  47. package/src/infra-contract.ts +12 -1
  48. package/src/operator-access.test.ts +11 -2
  49. package/src/operator-access.ts +38 -10
  50. package/src/remote-mcp.test.ts +196 -23
  51. package/src/remote-mcp.ts +68 -4
  52. package/src/runtime-secrets.test.ts +3 -3
  53. package/src/runtime-secrets.ts +2 -2
  54. package/src/stack-contract.test.ts +10 -8
  55. package/src/stack-contract.ts +110 -39
  56. package/src/stack-converge-secrets.test.ts +3 -2
  57. package/src/stack-converge.test.ts +4 -4
  58. package/src/stack-converge.ts +61 -0
  59. package/src/upgrade/app-roll.ts +8 -2
  60. package/src/upgrade/audit-job-roll.ts +3 -1
  61. package/src/upgrade/converge.ts +20 -4
  62. package/src/upgrade/upgrade.test.ts +1 -1
  63. package/src/wizards/gcp-cost.ts +1 -1
  64. package/src/wizards/gcp-pulumi.test.ts +15 -0
  65. package/src/wizards/gcp-pulumi.ts +18 -2
  66. package/src/wizards/gcp.ts +11 -2
  67. package/stacks/gcp/index.ts +9 -8
  68. package/stacks/gcp-firebase/index.ts +9 -8
@@ -1165,7 +1165,7 @@ async function stepRemoteMcp(
1165
1165
  const failed = (error: string) => {
1166
1166
  s.stop(yellow(`Remote MCP not prepared: ${error}`));
1167
1167
  log.warn(
1168
- `The install works; Settings → MCP reports remote MCP as unavailable until ${bold(selfCommand("upgrade"))} prepares it.`,
1168
+ `The install works; Settings → Google sign-in and Settings → MCP report this install as not prepared until ${bold(selfCommand("upgrade"))} prepares it.`,
1169
1169
  );
1170
1170
  return false;
1171
1171
  };
@@ -1181,7 +1181,16 @@ async function stepRemoteMcp(
1181
1181
  services: { admin, gateway },
1182
1182
  });
1183
1183
  if (!env.ok) return failed(env.error);
1184
- s.stop(green(`Remote MCP prepared (${env.identity.mcpPublicUrl})`));
1184
+ s.stop(green(`Remote MCP and Google sign-in prepared (${env.identity.mcpPublicUrl})`));
1185
+ if (env.orgDomainError) {
1186
+ // #914 — without the organisation's domain the admin cannot tell who
1187
+ // IAP's built-in sign-in admits, so it refuses new users until the
1188
+ // Owner sets up Google sign-in. Say so now rather than at the first
1189
+ // invite.
1190
+ log.warn(
1191
+ `Could not read this project's Google organisation (${env.orgDomainError}). Set up Google sign-in under Settings → Google sign-in before adding users, or re-run ${bold(selfCommand("upgrade"))} as an account with the Organization Viewer role.`,
1192
+ );
1193
+ }
1185
1194
  return true;
1186
1195
  }
1187
1196
 
@@ -254,9 +254,10 @@ const runtimeSecretIds: Record<RuntimeSecret, pulumi.Input<string>> = {
254
254
  "tool-approval-secret": gcpSecretId(env, "tool-approval-secret"),
255
255
  "staging-gate-secret": gcpSecretId(env, "staging-gate-secret"),
256
256
  "public-role-password": gcpSecretId(env, "public-role-password"),
257
- // #806 — remote MCP: the Owner-set Google OAuth client (a placeholder
258
- // until then) and the broker's seal key, both CLI-generated.
259
- "mcp-oauth-client": gcpSecretId(env, "mcp-oauth-client"),
257
+ // #914 / #806 — the Owner-set Google sign-in client (a placeholder until
258
+ // then; IAP login, IAP programmatic access and the remote-MCP broker) and
259
+ // the broker's seal key, both CLI-generated.
260
+ "operator-oauth-client": gcpSecretId(env, "operator-oauth-client"),
260
261
  "mcp-oauth-seal-key": gcpSecretId(env, "mcp-oauth-seal-key"),
261
262
  };
262
263
 
@@ -479,14 +480,14 @@ for (const binding of runtimeSecretBindings()) {
479
480
  );
480
481
  }
481
482
 
482
- // #806 — the Owner's remote-MCP setup (Settings → MCP → Remote) stores the
483
- // Google OAuth client in this one secret. Add-version only: the admin can
484
- // replace the client the gateway reads, never read it back or touch any
483
+ // #914 — the Owner's Google sign-in setup (Settings → Google sign-in) stores
484
+ // the install's Google OAuth client in this one secret. Add-version only: the
485
+ // admin can replace the client the gateway and the operator-access job read, never read it back or touch any
485
486
  // other secret (stack-contract.ts GCP_COMMON says why).
486
487
  new gcp.secretmanager.SecretIamMember(
487
- `${namePrefix}-admin-mcp-oauth-client-version-adder`,
488
+ `${namePrefix}-admin-operator-oauth-client-version-adder`,
488
489
  {
489
- secretId: runtimeSecretIds["mcp-oauth-client"],
490
+ secretId: runtimeSecretIds["operator-oauth-client"],
490
491
  role: "roles/secretmanager.secretVersionAdder",
491
492
  member: pulumi.interpolate`serviceAccount:${runSa.email}`,
492
493
  },
@@ -226,9 +226,10 @@ const runtimeSecretIds: Record<RuntimeSecret, pulumi.Input<string>> = {
226
226
  "tool-approval-secret": gcpSecretId(env, "tool-approval-secret"),
227
227
  "staging-gate-secret": gcpSecretId(env, "staging-gate-secret"),
228
228
  "public-role-password": gcpSecretId(env, "public-role-password"),
229
- // #806 — remote MCP: the Owner-set Google OAuth client (a placeholder
230
- // until then) and the broker's seal key, both CLI-generated.
231
- "mcp-oauth-client": gcpSecretId(env, "mcp-oauth-client"),
229
+ // #914 / #806 — the Owner-set Google sign-in client (a placeholder until
230
+ // then; IAP login, IAP programmatic access and the remote-MCP broker) and
231
+ // the broker's seal key, both CLI-generated.
232
+ "operator-oauth-client": gcpSecretId(env, "operator-oauth-client"),
232
233
  "mcp-oauth-seal-key": gcpSecretId(env, "mcp-oauth-seal-key"),
233
234
  };
234
235
 
@@ -382,14 +383,14 @@ for (const binding of runtimeSecretBindings()) {
382
383
  );
383
384
  }
384
385
 
385
- // #806 — the Owner's remote-MCP setup (Settings → MCP → Remote) stores the
386
- // Google OAuth client in this one secret. Add-version only: the admin can
387
- // replace the client the gateway reads, never read it back or touch any
386
+ // #914 — the Owner's Google sign-in setup (Settings → Google sign-in) stores
387
+ // the install's Google OAuth client in this one secret. Add-version only: the
388
+ // admin can replace the client the gateway and the operator-access job read, never read it back or touch any
388
389
  // other secret (stack-contract.ts GCP_COMMON says why).
389
390
  new gcp.secretmanager.SecretIamMember(
390
- `${namePrefix}-admin-mcp-oauth-client-version-adder`,
391
+ `${namePrefix}-admin-operator-oauth-client-version-adder`,
391
392
  {
392
- secretId: runtimeSecretIds["mcp-oauth-client"],
393
+ secretId: runtimeSecretIds["operator-oauth-client"],
393
394
  role: "roles/secretmanager.secretVersionAdder",
394
395
  member: pulumi.interpolate`serviceAccount:${runSa.email}`,
395
396
  },