forgeos 0.1.0-alpha.52 → 0.1.0-alpha.54
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.
|
|
1
|
+
// @forge-generated generator=0.1.0-alpha.54 input=7577a1a1a717ae3776c6725b005a98a36c149041f62ef4e28e098baad0bd1fcc content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
|
|
2
2
|
# AGENTS.md
|
|
3
3
|
|
|
4
4
|
<!-- forge-generated:start -->
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# forgeos
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.54
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add a machine-readable WorkOS FGA hosted setup artifact.
|
|
8
|
+
|
|
9
|
+
- `forge workos fga plan --write --json` and real sync failures that write
|
|
10
|
+
`.forge/workos-fga-setup.md` now also write
|
|
11
|
+
`.forge/workos-fga-setup.json`.
|
|
12
|
+
- The JSON artifact includes the derived resource types, hosted setup
|
|
13
|
+
boundary, rerun commands, docs, unsupported automation notes, and paired
|
|
14
|
+
Markdown/JSON paths so agents and CI can consume the FGA handoff without
|
|
15
|
+
parsing Markdown.
|
|
16
|
+
- Human output now prints both the Markdown guide and JSON setup artifact
|
|
17
|
+
paths when they are written.
|
|
18
|
+
|
|
19
|
+
## 0.1.0-alpha.53
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Keep WorkOS FGA proof messaging honest across local and real modes.
|
|
24
|
+
|
|
25
|
+
- `forge workos fga doctor --json` now reports local proof timestamps as
|
|
26
|
+
local proof instead of using real-production wording when the state file was
|
|
27
|
+
produced by local FGA proof commands.
|
|
28
|
+
- This prevents local/mock FGA evidence from being mistaken for hosted WorkOS
|
|
29
|
+
Authorization API proof during production-readiness handoff.
|
|
30
|
+
|
|
3
31
|
## 0.1.0-alpha.52
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/docs/changelog.md
CHANGED
|
@@ -6,6 +6,20 @@ The canonical source file in the repository is `CHANGELOG.md`.
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 0.1.0-alpha.54
|
|
10
|
+
|
|
11
|
+
- WorkOS FGA setup writes now produce a paired machine-readable
|
|
12
|
+
`.forge/workos-fga-setup.json` artifact alongside the Markdown guide.
|
|
13
|
+
- The JSON artifact includes derived resource types, hosted setup boundary,
|
|
14
|
+
rerun commands, docs, unsupported automation notes, and paired artifact paths
|
|
15
|
+
for agents and CI.
|
|
16
|
+
|
|
17
|
+
## 0.1.0-alpha.53
|
|
18
|
+
|
|
19
|
+
- `forge workos fga doctor --json` now distinguishes local FGA proof timestamps
|
|
20
|
+
from real WorkOS Authorization API proof timestamps, avoiding production
|
|
21
|
+
readiness confusion in agent handoffs.
|
|
22
|
+
|
|
9
23
|
## 0.1.0-alpha.52
|
|
10
24
|
|
|
11
25
|
- Generated WorkOS FGA setup guides now include an explicit automation boundary
|
package/package.json
CHANGED
|
@@ -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.
|
|
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.54","releaseId":"forgeos@0.1.0-alpha.54+unknown","schemaVersion":"0.1.0"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @forge-generated generator=0.1.0-alpha.
|
|
1
|
+
// @forge-generated generator=0.1.0-alpha.54 input=7577a1a1a717ae3776c6725b005a98a36c149041f62ef4e28e098baad0bd1fcc content=7078de03fb1c3ae829b803fdfd1e9320fa10b8c128e51d374d8afab09cdc3df5
|
|
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.
|
|
23
|
-
"releaseId": "forgeos@0.1.0-alpha.
|
|
22
|
+
"packageVersion": "0.1.0-alpha.54",
|
|
23
|
+
"releaseId": "forgeos@0.1.0-alpha.54+unknown",
|
|
24
24
|
"schemaVersion": "0.1.0"
|
|
25
25
|
} as const;
|
package/src/forge/cli/workos.ts
CHANGED
|
@@ -57,6 +57,7 @@ const GENERATED_SEED_FILE = `${GENERATED_DIR}/integrations/workos/workos-seed.ym
|
|
|
57
57
|
const WORKOS_SEED_STATE_FILE = ".workos-seed-state.json";
|
|
58
58
|
const WORKOS_FGA_STATE_FILE = ".workos-fga-state.json";
|
|
59
59
|
const WORKOS_FGA_SETUP_GUIDE_FILE = ".forge/workos-fga-setup.md";
|
|
60
|
+
const WORKOS_FGA_SETUP_PLAN_FILE = ".forge/workos-fga-setup.json";
|
|
60
61
|
|
|
61
62
|
function runExternalCommand(
|
|
62
63
|
command: string[],
|
|
@@ -714,7 +715,16 @@ export interface WorkOSFgaResourceTypeSetup {
|
|
|
714
715
|
}
|
|
715
716
|
|
|
716
717
|
export interface WorkOSFgaSetupGuide {
|
|
718
|
+
schemaVersion: "0.1.0";
|
|
719
|
+
kind: "workos-fga-setup";
|
|
717
720
|
resourceTypes: WorkOSFgaResourceTypeSetup[];
|
|
721
|
+
hostedSetup: WorkOSFgaHostedSetup;
|
|
722
|
+
commands: {
|
|
723
|
+
plan: string;
|
|
724
|
+
syncReal: string;
|
|
725
|
+
proveReal: string;
|
|
726
|
+
deployCheck: string;
|
|
727
|
+
};
|
|
718
728
|
markdown: string;
|
|
719
729
|
docs: string[];
|
|
720
730
|
unsupportedAutomation: string[];
|
|
@@ -1196,7 +1206,16 @@ function workOSFgaSetupGuide(manifest: WorkOSFgaManifest, hostedSetup: WorkOSFga
|
|
|
1196
1206
|
"",
|
|
1197
1207
|
].join("\n");
|
|
1198
1208
|
return {
|
|
1209
|
+
schemaVersion: "0.1.0",
|
|
1210
|
+
kind: "workos-fga-setup",
|
|
1199
1211
|
resourceTypes,
|
|
1212
|
+
hostedSetup,
|
|
1213
|
+
commands: {
|
|
1214
|
+
plan: "forge workos fga plan --file workos-seed.yml --write --json",
|
|
1215
|
+
syncReal: "forge workos fga sync --real --file workos-seed.yml --json",
|
|
1216
|
+
proveReal: "forge workos fga prove --real --file workos-seed.yml --json",
|
|
1217
|
+
deployCheck: "forge deploy check --production --json",
|
|
1218
|
+
},
|
|
1200
1219
|
markdown,
|
|
1201
1220
|
docs: hostedSetup.docs,
|
|
1202
1221
|
unsupportedAutomation: [
|
|
@@ -1214,16 +1233,34 @@ function resolveWorkOSFgaSetupGuidePath(options: WorkOSCommandOptions): string |
|
|
|
1214
1233
|
return candidate && candidate !== "true" && !candidate.startsWith("--") ? candidate : WORKOS_FGA_SETUP_GUIDE_FILE;
|
|
1215
1234
|
}
|
|
1216
1235
|
|
|
1236
|
+
function workOSFgaSetupPlanPath(markdownPath: string): string {
|
|
1237
|
+
if (markdownPath === WORKOS_FGA_SETUP_GUIDE_FILE) {
|
|
1238
|
+
return WORKOS_FGA_SETUP_PLAN_FILE;
|
|
1239
|
+
}
|
|
1240
|
+
return markdownPath.endsWith(".md")
|
|
1241
|
+
? `${markdownPath.slice(0, -3)}.json`
|
|
1242
|
+
: `${markdownPath}.json`;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1217
1245
|
function writeWorkOSFgaSetupGuide(
|
|
1218
1246
|
workspaceRoot: string,
|
|
1219
1247
|
guide: WorkOSFgaSetupGuide,
|
|
1220
1248
|
preferredPath = WORKOS_FGA_SETUP_GUIDE_FILE,
|
|
1221
|
-
): string {
|
|
1249
|
+
): { markdownPath: string; jsonPath: string } {
|
|
1222
1250
|
const relativePath = preferredPath.startsWith("/") ? preferredPath.slice(1) : preferredPath;
|
|
1223
1251
|
const absolutePath = join(workspaceRoot, relativePath);
|
|
1224
1252
|
mkdirSync(dirname(absolutePath), { recursive: true });
|
|
1225
1253
|
writeFileSync(absolutePath, guide.markdown, "utf8");
|
|
1226
|
-
|
|
1254
|
+
const jsonPath = workOSFgaSetupPlanPath(relativePath);
|
|
1255
|
+
const absoluteJsonPath = join(workspaceRoot, jsonPath);
|
|
1256
|
+
mkdirSync(dirname(absoluteJsonPath), { recursive: true });
|
|
1257
|
+
const { markdown: _markdown, ...jsonGuide } = guide;
|
|
1258
|
+
writeFileSync(absoluteJsonPath, `${JSON.stringify({
|
|
1259
|
+
...jsonGuide,
|
|
1260
|
+
markdownPath: relativePath,
|
|
1261
|
+
jsonPath,
|
|
1262
|
+
}, null, 2)}\n`, "utf8");
|
|
1263
|
+
return { markdownPath: relativePath, jsonPath };
|
|
1227
1264
|
}
|
|
1228
1265
|
|
|
1229
1266
|
function fgaData(input: {
|
|
@@ -1240,6 +1277,7 @@ function fgaData(input: {
|
|
|
1240
1277
|
nextCommand?: string;
|
|
1241
1278
|
nextActions?: string[];
|
|
1242
1279
|
setupGuidePath?: string;
|
|
1280
|
+
setupGuideJsonPath?: string;
|
|
1243
1281
|
}): Record<string, unknown> {
|
|
1244
1282
|
const hostedSetup = workOSFgaHostedSetup(input.manifest, input.workosSdk);
|
|
1245
1283
|
const setupGuide = workOSFgaSetupGuide(input.manifest, hostedSetup);
|
|
@@ -1259,6 +1297,7 @@ function fgaData(input: {
|
|
|
1259
1297
|
...(input.workosSdk ? { workosSdk: input.workosSdk } : {}),
|
|
1260
1298
|
...(input.stateFile ? { stateFile: input.stateFile } : {}),
|
|
1261
1299
|
...(input.setupGuidePath ? { setupGuidePath: input.setupGuidePath } : {}),
|
|
1300
|
+
...(input.setupGuideJsonPath ? { setupGuideJsonPath: input.setupGuideJsonPath } : {}),
|
|
1262
1301
|
nextCommand: input.nextCommand,
|
|
1263
1302
|
nextActions: input.nextActions ?? hostedSetup.nextActions,
|
|
1264
1303
|
notes: [
|
|
@@ -2621,7 +2660,9 @@ function collectWorkOSFgaChecks(input: {
|
|
|
2621
2660
|
name: "fga-proof-state",
|
|
2622
2661
|
ok: !input.requireProof || Boolean(input.state.provedAt),
|
|
2623
2662
|
detail: input.state.provedAt
|
|
2624
|
-
?
|
|
2663
|
+
? input.state.mode === "real"
|
|
2664
|
+
? `${WORKOS_FGA_STATE_FILE} records real proof at ${input.state.provedAt}`
|
|
2665
|
+
: `${WORKOS_FGA_STATE_FILE} records local proof at ${input.state.provedAt}`
|
|
2625
2666
|
: input.requireProof
|
|
2626
2667
|
? `${WORKOS_FGA_STATE_FILE} must be produced by forge workos fga prove --real --json`
|
|
2627
2668
|
: `${WORKOS_FGA_STATE_FILE} proof timestamp not required for this command`,
|
|
@@ -2762,9 +2803,12 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
2762
2803
|
const manifest = collectWorkOSFgaManifest(options.workspaceRoot, file);
|
|
2763
2804
|
const initialHostedSetup = workOSFgaHostedSetup(manifest);
|
|
2764
2805
|
const setupGuidePath = resolveWorkOSFgaSetupGuidePath(options);
|
|
2765
|
-
const
|
|
2806
|
+
const writtenSetupGuide = setupGuidePath
|
|
2766
2807
|
? writeWorkOSFgaSetupGuide(options.workspaceRoot, workOSFgaSetupGuide(manifest, initialHostedSetup), setupGuidePath)
|
|
2767
2808
|
: undefined;
|
|
2809
|
+
const writtenSetupGuideData = writtenSetupGuide
|
|
2810
|
+
? { setupGuidePath: writtenSetupGuide.markdownPath, setupGuideJsonPath: writtenSetupGuide.jsonPath }
|
|
2811
|
+
: {};
|
|
2768
2812
|
let state = readWorkOSFgaState(options.workspaceRoot, manifest);
|
|
2769
2813
|
const command = ["forge", "workos", "fga", action, "--file", file];
|
|
2770
2814
|
const real = options.real ?? false;
|
|
@@ -2796,7 +2840,7 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
2796
2840
|
state,
|
|
2797
2841
|
seedState,
|
|
2798
2842
|
real,
|
|
2799
|
-
...
|
|
2843
|
+
...writtenSetupGuideData,
|
|
2800
2844
|
nextCommand: `forge workos fga sync --file ${file} --json`,
|
|
2801
2845
|
}),
|
|
2802
2846
|
exitCode: ok ? 0 : 1,
|
|
@@ -2833,7 +2877,7 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
2833
2877
|
seedState,
|
|
2834
2878
|
real,
|
|
2835
2879
|
...(cliAuth ? { cliAuth } : {}),
|
|
2836
|
-
...
|
|
2880
|
+
...writtenSetupGuideData,
|
|
2837
2881
|
nextCommand: real ? `forge workos fga sync --real --file ${file} --json` : `forge workos fga plan --file ${file} --json`,
|
|
2838
2882
|
}),
|
|
2839
2883
|
exitCode: 1,
|
|
@@ -2854,7 +2898,7 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
2854
2898
|
seedState,
|
|
2855
2899
|
real,
|
|
2856
2900
|
...(cliAuth ? { cliAuth } : {}),
|
|
2857
|
-
...
|
|
2901
|
+
...writtenSetupGuideData,
|
|
2858
2902
|
nextCommand: real ? `forge workos fga sync --real --file ${file} --json` : `forge workos fga sync --file ${file} --json`,
|
|
2859
2903
|
}),
|
|
2860
2904
|
exitCode: 0,
|
|
@@ -2884,7 +2928,7 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
2884
2928
|
real,
|
|
2885
2929
|
...(cliAuth ? { cliAuth } : {}),
|
|
2886
2930
|
workosSdk: sdk.data,
|
|
2887
|
-
...
|
|
2931
|
+
...writtenSetupGuideData,
|
|
2888
2932
|
nextCommand: `forge workos fga sync --real --file ${file} --json`,
|
|
2889
2933
|
nextActions: workOSFgaHostedSetup(manifest, sdk.data).nextActions,
|
|
2890
2934
|
}),
|
|
@@ -2917,7 +2961,7 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
2917
2961
|
...(cliAuth ? { cliAuth } : {}),
|
|
2918
2962
|
...(sdk ? { workosSdk: sdk.data } : {}),
|
|
2919
2963
|
stateFile,
|
|
2920
|
-
...
|
|
2964
|
+
...writtenSetupGuideData,
|
|
2921
2965
|
nextCommand: real ? `forge workos fga prove --real --file ${file} --json` : `forge workos fga prove --file ${file} --json`,
|
|
2922
2966
|
}),
|
|
2923
2967
|
exitCode: 0,
|
|
@@ -2990,7 +3034,7 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
2990
3034
|
...(cliAuth ? { cliAuth } : {}),
|
|
2991
3035
|
...(sdk ? { workosSdk: sdk.data } : {}),
|
|
2992
3036
|
...(stateFile ? { stateFile } : {}),
|
|
2993
|
-
...
|
|
3037
|
+
...writtenSetupGuideData,
|
|
2994
3038
|
nextCommand: ok ? "forge deploy check --production --json" : `forge workos fga sync${real ? " --real" : ""} --file ${file} --json`,
|
|
2995
3039
|
}),
|
|
2996
3040
|
stdout: sdk?.stdout,
|
|
@@ -3030,7 +3074,7 @@ export function runWorkOSFgaCommand(options: WorkOSCommandOptions): WorkOSComman
|
|
|
3030
3074
|
seedState,
|
|
3031
3075
|
readiness,
|
|
3032
3076
|
real,
|
|
3033
|
-
...
|
|
3077
|
+
...writtenSetupGuideData,
|
|
3034
3078
|
nextCommand: readiness.nextCommand,
|
|
3035
3079
|
nextActions: readiness.nextActions,
|
|
3036
3080
|
}),
|
|
@@ -3157,11 +3201,14 @@ export function formatWorkOSHuman(result: WorkOSCommandResult): string {
|
|
|
3157
3201
|
}
|
|
3158
3202
|
if (result.kind === "workos-fga") {
|
|
3159
3203
|
const data = result.data && typeof result.data === "object"
|
|
3160
|
-
? result.data as { action?: string; real?: boolean; nextCommand?: string; stateFile?: string; setupGuidePath?: string; nextActions?: string[] }
|
|
3204
|
+
? result.data as { action?: string; real?: boolean; nextCommand?: string; stateFile?: string; setupGuidePath?: string; setupGuideJsonPath?: string; nextActions?: string[] }
|
|
3161
3205
|
: {};
|
|
3162
3206
|
if (data.setupGuidePath) {
|
|
3163
3207
|
lines.push(`FGA setup guide: ${data.setupGuidePath}`);
|
|
3164
3208
|
}
|
|
3209
|
+
if (data.setupGuideJsonPath) {
|
|
3210
|
+
lines.push(`FGA setup JSON: ${data.setupGuideJsonPath}`);
|
|
3211
|
+
}
|
|
3165
3212
|
if (result.ok && data.action === "plan") {
|
|
3166
3213
|
lines.push(`WorkOS FGA plan passed; run ${data.nextCommand ?? "forge workos fga sync --json"}.`);
|
|
3167
3214
|
} else if (result.ok && data.action === "sync") {
|
package/src/forge/version.ts
CHANGED