forgeos 0.1.0-alpha.46 → 0.1.0-alpha.47

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/AGENTS.md CHANGED
@@ -1,4 +1,4 @@
1
- // @forge-generated generator=0.1.0-alpha.46 input=fa019b5420e754f08100c96852edfc9ea0b39a6b050cbd9bc99106b88775c207 content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
1
+ // @forge-generated generator=0.1.0-alpha.47 input=2bfccc8587b228260a6fa7172aa13b90311bacf5c1ddfa549d864e057cb0c6bf content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
2
2
  # AGENTS.md
3
3
 
4
4
  <!-- forge-generated:start -->
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # forgeos
2
2
 
3
+ ## 0.1.0-alpha.47
4
+
5
+ ### Patch Changes
6
+
7
+ - Tighten the WorkOS real-auth proof and production deploy readiness gates.
8
+
9
+ - `forge workos setup --real` and `forge workos prove --real` now validate
10
+ the real OIDC/JWT and WorkOS environment before attempting hosted setup,
11
+ with specific failed checks such as `setup:real-env-forge_auth_audience`
12
+ instead of a generic setup failure.
13
+ - `forge deploy check --production` now requires WorkOS-backed apps to carry
14
+ hosted seed evidence in `.workos-seed-state.json` that matches the current
15
+ `workos-seed.yml`, pointing operators at `forge workos prove --real` when
16
+ hosted seed state is missing or stale.
17
+ - Update production, self-hosting, and field-test documentation so local mock
18
+ field-test evidence, hosted WorkOS seed evidence, and deploy env evidence
19
+ have clear boundaries.
20
+
3
21
  ## 0.1.0-alpha.46
4
22
 
5
23
  ### Patch Changes
package/docs/changelog.md CHANGED
@@ -6,6 +6,19 @@ The canonical source file in the repository is `CHANGELOG.md`.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.1.0-alpha.47
10
+
11
+ - `forge workos setup --real` and `forge workos prove --real` now validate the
12
+ real OIDC/JWT and WorkOS environment before hosted setup, surfacing exact
13
+ failed checks like `setup:real-env-forge_auth_audience`.
14
+ - `forge deploy check --production` now requires WorkOS-backed apps to include
15
+ hosted seed evidence in `.workos-seed-state.json` matching the current
16
+ `workos-seed.yml`, with a direct `forge workos prove --real --file
17
+ workos-seed.yml --json` remediation.
18
+ - Clarified production, self-host, and field-test docs so local mock evidence,
19
+ hosted WorkOS seed evidence, and production deploy env evidence are treated
20
+ as separate gates.
21
+
9
22
  ## 0.1.0-alpha.46
10
23
 
11
24
  - `forge deps upgrade-apply` and `forge deps upgrade-rollback` now accept the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgeos",
3
- "version": "0.1.0-alpha.46",
3
+ "version": "0.1.0-alpha.47",
4
4
  "description": "Agent-native application framework and compiler for building Forge apps without a mandatory dashboard.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- {"defaultProvider":"local","diagnostics":[],"env":{"deployEnv":"FORGE_DEPLOY_ENV","deployId":"FORGE_DEPLOY_ID","publicReleaseId":"NEXT_PUBLIC_FORGE_RELEASE_ID","releaseId":"FORGE_RELEASE_ID"},"gitSha":"unknown","optionalProviders":["local","sentry-compatible","sentry","glitchtip","bugsink","otel","custom"],"packageName":"forgeos","packageVersion":"0.1.0-alpha.46","releaseId":"forgeos@0.1.0-alpha.46+unknown","schemaVersion":"0.1.0"}
1
+ {"defaultProvider":"local","diagnostics":[],"env":{"deployEnv":"FORGE_DEPLOY_ENV","deployId":"FORGE_DEPLOY_ID","publicReleaseId":"NEXT_PUBLIC_FORGE_RELEASE_ID","releaseId":"FORGE_RELEASE_ID"},"gitSha":"unknown","optionalProviders":["local","sentry-compatible","sentry","glitchtip","bugsink","otel","custom"],"packageName":"forgeos","packageVersion":"0.1.0-alpha.47","releaseId":"forgeos@0.1.0-alpha.47+unknown","schemaVersion":"0.1.0"}
@@ -1,4 +1,4 @@
1
- // @forge-generated generator=0.1.0-alpha.46 input=fa019b5420e754f08100c96852edfc9ea0b39a6b050cbd9bc99106b88775c207 content=715d49dd9abed8465a5cf5e82713973aab97cc178fda3b1e8b1647b93683ee58
1
+ // @forge-generated generator=0.1.0-alpha.47 input=2bfccc8587b228260a6fa7172aa13b90311bacf5c1ddfa549d864e057cb0c6bf content=8f94368d298a28e68f6aaaf12350b8c58f890a4dc0d060299824515dce02cae6
2
2
  export const releaseManifest = {
3
3
  "defaultProvider": "local",
4
4
  "diagnostics": [],
@@ -19,7 +19,7 @@ export const releaseManifest = {
19
19
  "custom"
20
20
  ],
21
21
  "packageName": "forgeos",
22
- "packageVersion": "0.1.0-alpha.46",
23
- "releaseId": "forgeos@0.1.0-alpha.46+unknown",
22
+ "packageVersion": "0.1.0-alpha.47",
23
+ "releaseId": "forgeos@0.1.0-alpha.47+unknown",
24
24
  "schemaVersion": "0.1.0"
25
25
  } as const;
@@ -609,6 +609,18 @@ Required production posture:
609
609
  - issuer, audience, and JWKS/discovery settings match the auth provider
610
610
  - any provider secrets listed in the example are set in the deployment secret store
611
611
 
612
+ For WorkOS-backed apps, local dry-runs are not enough for production deploy
613
+ readiness. Run:
614
+
615
+ \`\`\`bash
616
+ forge workos prove --real --file workos-seed.yml --json
617
+ \`\`\`
618
+
619
+ This applies or confirms hosted WorkOS config/seed through the WorkOS CLI and
620
+ writes \`.workos-seed-state.json\`. \`forge deploy check --production\` requires
621
+ that state to match the current \`workos-seed.yml\` before treating WorkOS
622
+ posture as production evidence.
623
+
612
624
  ## 2. Prove the app before traffic
613
625
 
614
626
  \`\`\`bash
@@ -616,6 +628,7 @@ forge generate --check --json
616
628
  forge check --json
617
629
  forge authmd generate --json
618
630
  forge auth prove --scenario multi-tenant --json
631
+ forge workos prove --real --file workos-seed.yml --json
619
632
  forge field-test run --realistic --json
620
633
  forge deploy check --production --json
621
634
  \`\`\`
@@ -825,6 +838,21 @@ async function buildChecks(options: DeployCommandOptions): Promise<DeployCommand
825
838
  command: "forge workos doctor --json",
826
839
  details: workosDoctor.checks,
827
840
  });
841
+ const workosData = workosDoctor.data && typeof workosDoctor.data === "object"
842
+ ? workosDoctor.data as { seedState?: { exists?: boolean; valid?: boolean; matchesSeedHash?: boolean | null; alreadyApplied?: boolean } }
843
+ : {};
844
+ const seedState = workosData.seedState;
845
+ const hostedSeedOk = Boolean(seedState?.exists && seedState.valid && seedState.matchesSeedHash === true);
846
+ checks.push({
847
+ name: "workos-hosted-seed",
848
+ ok: !options.production || hostedSeedOk,
849
+ severity: options.production ? "error" : "warning",
850
+ message: hostedSeedOk
851
+ ? `WorkOS hosted seed state matches workos-seed.yml${seedState?.alreadyApplied ? " and records idempotent existing resources" : ""}`
852
+ : "WorkOS production deploy requires hosted seed evidence matching workos-seed.yml",
853
+ command: "forge workos prove --real --file workos-seed.yml --json",
854
+ details: seedState,
855
+ });
828
856
  }
829
857
  const tenantProofRequired = auth.requiresTenant || hasWorkOSIntegration(options.workspaceRoot);
830
858
  const tenantProof = tenantProofRequired
@@ -329,6 +329,34 @@ function workosJwksUri(clientId: string | undefined): string {
329
329
  return clientId ? `https://api.workos.com/sso/jwks/${clientId}` : "https://api.workos.com/sso/jwks/<WORKOS_CLIENT_ID>";
330
330
  }
331
331
 
332
+ function collectWorkOSRealEnvChecks(workspaceRoot: string): WorkOSCheck[] {
333
+ const env = readRealEnv(workspaceRoot);
334
+ const authMode = env.FORGE_AUTH_MODE;
335
+ const clientId = env.WORKOS_CLIENT_ID || env.VITE_WORKOS_CLIENT_ID;
336
+ const required = [
337
+ ["WORKOS_API_KEY", "WorkOS API key is required to apply hosted seed/config"],
338
+ ["WORKOS_CLIENT_ID", "WorkOS client ID is required for AuthKit and JWKS discovery"],
339
+ ["WORKOS_COOKIE_PASSWORD", "cookie password is required for AuthKit session signing"],
340
+ ["FORGE_AUTH_ISSUER", "Forge OIDC issuer must be https://api.workos.com"],
341
+ ["FORGE_AUTH_AUDIENCE", "Forge OIDC audience must match the WorkOS client/application audience"],
342
+ ["FORGE_AUTH_JWKS_URI", `Forge JWKS URI must be configured, usually ${workosJwksUri(clientId)}`],
343
+ ] as const;
344
+ return [
345
+ {
346
+ name: "real-env-auth-mode",
347
+ ok: authMode === "oidc" || authMode === "jwt",
348
+ detail: authMode === "oidc" || authMode === "jwt"
349
+ ? `FORGE_AUTH_MODE=${authMode} is production-capable`
350
+ : "FORGE_AUTH_MODE must be oidc or jwt before running hosted WorkOS proof",
351
+ },
352
+ ...required.map(([name, detail]) => ({
353
+ name: `real-env-${name.toLowerCase()}`,
354
+ ok: hasValue(env, name),
355
+ detail: hasValue(env, name) ? `${name} is present` : `${name} is missing: ${detail}`,
356
+ })),
357
+ ];
358
+ }
359
+
332
360
  export function collectPolicyPermissions(workspaceRoot: string): string[] {
333
361
  const registry = readJson(workspaceRoot, `${GENERATED_DIR}/policyRegistry.json`) as {
334
362
  policies?: Array<{ permissions?: string[] }>;
@@ -1141,7 +1169,9 @@ export function runWorkOSSeedCommand(options: WorkOSCommandOptions): WorkOSComma
1141
1169
  export function runWorkOSSetupCommand(options: WorkOSCommandOptions): WorkOSCommandResult {
1142
1170
  const file = options.file ?? DEFAULT_SEED_FILE;
1143
1171
  const checks = collectWorkOSChecks(options.workspaceRoot);
1144
- const localOk = checks.every((check) => check.ok);
1172
+ const realEnvChecks = options.real ? collectWorkOSRealEnvChecks(options.workspaceRoot) : [];
1173
+ const allChecks = [...checks, ...realEnvChecks];
1174
+ const localOk = allChecks.every((check) => check.ok);
1145
1175
  const seed = parseSeedFile(options.workspaceRoot, file);
1146
1176
  const seedState = readWorkOSSeedState(options.workspaceRoot, seed);
1147
1177
  const setupDryRun = options.dryRun || !options.real;
@@ -1151,7 +1181,7 @@ export function runWorkOSSetupCommand(options: WorkOSCommandOptions): WorkOSComm
1151
1181
  return {
1152
1182
  ok: false,
1153
1183
  kind: "workos-setup",
1154
- checks,
1184
+ checks: allChecks,
1155
1185
  command,
1156
1186
  applied: false,
1157
1187
  data: {
@@ -1195,7 +1225,7 @@ export function runWorkOSSetupCommand(options: WorkOSCommandOptions): WorkOSComm
1195
1225
  return {
1196
1226
  ok: seedResult.ok,
1197
1227
  kind: "workos-setup",
1198
- checks: seedResult.checks,
1228
+ checks: [...seedResult.checks, ...realEnvChecks],
1199
1229
  command: seedResult.command,
1200
1230
  applied: seedResult.ok,
1201
1231
  data: {
@@ -1233,6 +1263,9 @@ export function runWorkOSProveCommand(options: WorkOSCommandOptions): WorkOSComm
1233
1263
  real: options.real ?? false,
1234
1264
  file,
1235
1265
  });
1266
+ const setupBlockingChecks = setup.checks
1267
+ .filter((check) => !check.ok)
1268
+ .map((check) => ({ ...check, name: `setup:${check.name}` }));
1236
1269
  const checks: WorkOSCheck[] = [
1237
1270
  ...doctor.checks.map((check) => ({ ...check, name: `doctor:${check.name}` })),
1238
1271
  {
@@ -1242,6 +1275,7 @@ export function runWorkOSProveCommand(options: WorkOSCommandOptions): WorkOSComm
1242
1275
  ? `${file} is valid, app-aware, and ready for hosted application`
1243
1276
  : `${file} failed seed validation before hosted application`,
1244
1277
  },
1278
+ ...setupBlockingChecks,
1245
1279
  {
1246
1280
  name: options.real ? "setup:real" : "setup:dry-run",
1247
1281
  ok: setup.ok,
@@ -1,3 +1,3 @@
1
- export const FORGEOS_VERSION = "0.1.0-alpha.46";
1
+ export const FORGEOS_VERSION = "0.1.0-alpha.47";
2
2
  export const GENERATOR_VERSION = FORGEOS_VERSION;
3
3
  export const CLI_VERSION = FORGEOS_VERSION;