@opengeni/config 0.20.1-canary.2 → 0.22.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/config",
3
- "version": "0.20.1-canary.2",
3
+ "version": "0.22.0",
4
4
  "description": "OpenGeni runtime configuration: settings resolution, deployment knobs, and config validation shared across the server packages.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,9 +33,9 @@
33
33
  "prepublishOnly": "bash ../../scripts/prepublish-guard"
34
34
  },
35
35
  "dependencies": {
36
- "@opengeni/codex": "^0.2.19-canary.3",
37
- "@opengeni/contracts": "^2.5.0-canary.2",
38
- "@opengeni/xai-subscription": "^0.1.2-canary.3",
36
+ "@opengeni/codex": "^0.2.19",
37
+ "@opengeni/contracts": "^2.7.0",
38
+ "@opengeni/xai-subscription": "^0.1.2",
39
39
  "zod": "^4.2.1"
40
40
  },
41
41
  "engines": {
package/src/index.ts CHANGED
@@ -386,6 +386,21 @@ const SettingsSchema = z.object({
386
386
  // holder of stream:control gets 403 until this flips. Keeps stream:control a
387
387
  // declared-but-inert permission so later hardening is a flag flip.
388
388
  streamControlEnabled: EnvBoolean.default(false),
389
+ // Provider-neutral advisory work discovery rollout. Disabling this keeps
390
+ // ordinary session listings available while rejecting relevance discovery
391
+ // and omitting claim evidence from their compact projections.
392
+ workDiscoveryEnabled: EnvBoolean.default(true),
393
+ // Exact-attempt claim mutations are independently reversible. Turning this
394
+ // off removes the first-party mutation tools; durable claims and lifecycle
395
+ // settlement evidence remain readable.
396
+ workClaimMutationsEnabled: EnvBoolean.default(true),
397
+ // Human presentation is a separate rollout stage from the read API. The
398
+ // topology response carries this decision so clients can hide advisory UI
399
+ // without inventing authorization or ownership semantics.
400
+ workDiscoveryHumanAdvisoriesEnabled: EnvBoolean.default(true),
401
+ // Automatic overlap nudges are deliberately unshipped and default OFF until
402
+ // an evaluated precision threshold and operator runbook approve them.
403
+ workDiscoveryAutomaticNudgesEnabled: EnvBoolean.default(false),
389
404
  // Optional release-coherent bootstrap hint for custom rigs/connected machines
390
405
  // that do not carry the stock-image ogtool binary. Exact stable versions only:
391
406
  // the agent must never guess a tag or silently install `latest`.
@@ -1251,6 +1266,9 @@ const SettingsSchema = z.object({
1251
1266
  betterAuthAllowedHosts: z.string().default(""),
1252
1267
  betterAuthCookieDomain: z.string().optional(),
1253
1268
  betterAuthTrustedOrigins: z.string().default(""),
1269
+ // Rolling browser login-slot compatibility. Repository/deployment default is
1270
+ // deliberately legacy; changing to broker is an operator-authorized rollout.
1271
+ managedAuthSessionSetMode: z.enum(["legacy", "dual", "broker"]).default("legacy"),
1254
1272
  resendApiKey: z.string().optional(),
1255
1273
  emailFrom: z.string().default("OpenGeni <auth@mail.opengeni.ai>"),
1256
1274
  stripeSecretKey: z.string().optional(),
@@ -2319,6 +2337,14 @@ export function getSettings(): Settings {
2319
2337
  allowedFirstPartyMcpTools: optional("OPENGENI_ALLOWED_FIRST_PARTY_MCP_TOOLS"),
2320
2338
  streamTokenSecret: optional("OPENGENI_STREAM_TOKEN_SECRET"),
2321
2339
  streamControlEnabled: optional("OPENGENI_STREAM_CONTROL_ENABLED"),
2340
+ workDiscoveryEnabled: optional("OPENGENI_WORK_DISCOVERY_ENABLED"),
2341
+ workClaimMutationsEnabled: optional("OPENGENI_WORK_CLAIM_MUTATIONS_ENABLED"),
2342
+ workDiscoveryHumanAdvisoriesEnabled: optional(
2343
+ "OPENGENI_WORK_DISCOVERY_HUMAN_ADVISORIES_ENABLED",
2344
+ ),
2345
+ workDiscoveryAutomaticNudgesEnabled: optional(
2346
+ "OPENGENI_WORK_DISCOVERY_AUTOMATIC_NUDGES_ENABLED",
2347
+ ),
2322
2348
  ogtoolPackageSpec: optional("OPENGENI_OGTOOL_PACKAGE_SPEC"),
2323
2349
  environmentsEncryptionKey: optional("OPENGENI_ENVIRONMENTS_ENCRYPTION_KEY"),
2324
2350
  integrationsEnabled: optional("OPENGENI_INTEGRATIONS_ENABLED"),
@@ -2638,6 +2664,7 @@ export function getSettings(): Settings {
2638
2664
  betterAuthAllowedHosts: optional("OPENGENI_BETTER_AUTH_ALLOWED_HOSTS"),
2639
2665
  betterAuthCookieDomain: optional("OPENGENI_BETTER_AUTH_COOKIE_DOMAIN"),
2640
2666
  betterAuthTrustedOrigins: optional("OPENGENI_BETTER_AUTH_TRUSTED_ORIGINS"),
2667
+ managedAuthSessionSetMode: optional("OPENGENI_MANAGED_AUTH_SESSION_SET_MODE"),
2641
2668
  resendApiKey: optional("OPENGENI_RESEND_API_KEY"),
2642
2669
  emailFrom: optional("OPENGENI_EMAIL_FROM"),
2643
2670
  stripeSecretKey: optional("OPENGENI_STRIPE_SECRET_KEY"),
@@ -5290,6 +5317,15 @@ function validateSettings(settings: Settings): void {
5290
5317
  "OPENGENI_DELEGATION_SECRET is required when OPENGENI_PRODUCT_ACCESS_MODE=managed",
5291
5318
  );
5292
5319
  }
5320
+ if (
5321
+ settings.managedAuthSessionSetMode !== "legacy" &&
5322
+ !["local", "test"].includes(settings.environment) &&
5323
+ !settings.publicBaseUrl.startsWith("https://")
5324
+ ) {
5325
+ throw new Error(
5326
+ "OPENGENI_PUBLIC_BASE_URL must use https when browser session sets are enabled outside local/test",
5327
+ );
5328
+ }
5293
5329
  if (!["local", "test"].includes(settings.environment) && !settings.resendApiKey) {
5294
5330
  throw new Error("OPENGENI_RESEND_API_KEY is required for managed mode outside local/test");
5295
5331
  }