forgeos 0.1.0-alpha.41 → 0.1.0-alpha.43

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 (66) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +46 -2
  3. package/docs/changelog.md +222 -0
  4. package/package.json +2 -1
  5. package/scripts/field-test-forgeos.mjs +1012 -0
  6. package/src/forge/_generated/releaseManifest.json +1 -1
  7. package/src/forge/_generated/releaseManifest.ts +3 -3
  8. package/src/forge/cli/auth.ts +1 -0
  9. package/src/forge/cli/commands.ts +13 -0
  10. package/src/forge/cli/deploy.ts +109 -18
  11. package/src/forge/cli/dev.ts +176 -10
  12. package/src/forge/cli/field-test.ts +210 -18
  13. package/src/forge/cli/main.ts +16 -5
  14. package/src/forge/cli/new.ts +2 -1
  15. package/src/forge/cli/output.ts +9 -0
  16. package/src/forge/cli/parse.ts +95 -12
  17. package/src/forge/cli/run.ts +1 -0
  18. package/src/forge/cli/seed.ts +581 -0
  19. package/src/forge/cli/workos.ts +349 -16
  20. package/src/forge/compiler/agent-contract/build.ts +58 -0
  21. package/src/forge/compiler/data-graph/build.ts +29 -1
  22. package/src/forge/compiler/diagnostics/codes.ts +2 -0
  23. package/src/forge/compiler/diagnostics/create.ts +7 -0
  24. package/src/forge/compiler/integration/add.ts +305 -5
  25. package/src/forge/compiler/integration/templates/workos.ts +51 -2
  26. package/src/forge/compiler/orchestrator/plan.ts +2 -0
  27. package/src/forge/make/index.ts +2 -0
  28. package/src/forge/make/templates.ts +58 -4
  29. package/src/forge/runtime/external/bridge.ts +14 -0
  30. package/src/forge/server.ts +59 -9
  31. package/src/forge/ui/index.ts +643 -25
  32. package/src/forge/ui/types.ts +2 -1
  33. package/src/forge/version.ts +1 -1
  34. package/templates/agent-workroom/web/index.html +1 -0
  35. package/templates/agent-workroom/web/src/lib/forge.ts +9 -2
  36. package/templates/agent-workroom/web/vite.config.ts +36 -0
  37. package/templates/b2b-support-web/web/app/page.tsx +2 -2
  38. package/templates/b2b-support-web/web/lib/forge.ts +9 -2
  39. package/templates/b2b-support-web/web/next.config.ts +24 -0
  40. package/templates/minimal-web/web/index.html +1 -0
  41. package/templates/minimal-web/web/src/App.tsx +12 -6
  42. package/templates/minimal-web/web/src/lib/forge.ts +9 -2
  43. package/templates/minimal-web/web/src/styles.css +34 -0
  44. package/templates/minimal-web/web/vite.config.ts +36 -0
  45. package/templates/nuxt-web/web/app.vue +1 -1
  46. package/templates/vendor-access/.vscode/settings.json +14 -0
  47. package/templates/vendor-access/README.md +30 -0
  48. package/templates/vendor-access/forge.config.ts +3 -0
  49. package/templates/vendor-access/package.json +34 -0
  50. package/templates/vendor-access/src/commands/addEvidence.ts +42 -0
  51. package/templates/vendor-access/src/commands/approveAccessRequest.ts +43 -0
  52. package/templates/vendor-access/src/commands/createAccessRequest.ts +49 -0
  53. package/templates/vendor-access/src/commands/seedVendorAccessDemo.ts +200 -0
  54. package/templates/vendor-access/src/forge/schema.ts +74 -0
  55. package/templates/vendor-access/src/policies.ts +11 -0
  56. package/templates/vendor-access/src/queries/listVendorAccessDashboard.ts +24 -0
  57. package/templates/vendor-access/src/queries/liveVendorAccessDashboard.ts +24 -0
  58. package/templates/vendor-access/tsconfig.json +17 -0
  59. package/templates/vendor-access/web/index.html +13 -0
  60. package/templates/vendor-access/web/package.json +21 -0
  61. package/templates/vendor-access/web/src/App.tsx +573 -0
  62. package/templates/vendor-access/web/src/lib/forge.ts +20 -0
  63. package/templates/vendor-access/web/src/main.tsx +205 -0
  64. package/templates/vendor-access/web/src/styles.css +682 -0
  65. package/templates/vendor-access/web/tsconfig.json +18 -0
  66. package/templates/vendor-access/web/vite.config.ts +36 -0
package/AGENTS.md CHANGED
@@ -1,4 +1,4 @@
1
- // @forge-generated generator=0.1.0-alpha.41 input=472a35507fac4f297d64b66cb443aa712ceb113986ac03317278c6464c17cdd4 content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
1
+ // @forge-generated generator=0.1.0-alpha.43 input=f15e1d5ecb88338643677cb7fb622a7ccdcf347f2b5c020ea5ce16b33f7d1f56 content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
2
2
  # AGENTS.md
3
3
 
4
4
  <!-- forge-generated:start -->
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # forgeos
2
2
 
3
+ ## 0.1.0-alpha.43
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix `forge field-test run` in apps that use the published `forgeos` package.
8
+
9
+ - Include `scripts/field-test-forgeos.mjs` in the npm package so generated
10
+ apps can run the field-test harness without having a local ForgeOS checkout.
11
+ - Resolve the harness from either the app workspace or the installed package,
12
+ which keeps framework checkouts and installed-package app workflows working
13
+ with the same command.
14
+ - Improve the missing-harness diagnostic by reporting the searched paths and
15
+ suggesting an upgrade when the installed package does not include the
16
+ packaged harness.
17
+
18
+ ## 0.1.0-alpha.42
19
+
20
+ ### Patch Changes
21
+
22
+ - Make the ForgeOS production-like golden path explicit and verifiable.
23
+
24
+ - Add `forge field-test run --realistic` as the compact app validation path
25
+ for runtime, auth, and UI probes, defaulting to the WorkOS-backed
26
+ `vendor-access` flow when no template/auth override is provided.
27
+ - Add `forge deploy package --target docker` as the user-facing production
28
+ packaging command while keeping `forge deploy render docker` compatible.
29
+ - Add `forge workos prove --file workos-seed.yml --json` as a no-dashboard
30
+ aggregate proof for WorkOS/AuthKit/FGA/seed readiness, with `--real`
31
+ applying hosted setup through the existing WorkOS CLI integration.
32
+ - Promote `vendor-access` into a production-shaped field-test template with
33
+ deterministic all-tenant seeding, local identity profiles, WorkOS-style
34
+ permissions, auth metadata, UI scenarios, multi-tenant domain probes, and
35
+ deploy-readiness evidence.
36
+ - Tighten `forge field-test report` and `forge deploy check --production` so
37
+ they require concrete runtime, auth setup, auth metadata, UI, UI
38
+ ergonomics, seed readiness, and tenant-isolation evidence before reporting
39
+ deploy readiness.
40
+ - Improve UI ergonomics and browser probe diagnostics for local-vs-production
41
+ auth boundaries, seeded first-run state, policy denials, raw runtime errors,
42
+ and product surfaces that expose framework/demo internals too prominently.
43
+ - Add `forge seed status/dev/reset`, all-tenant seed startup support through
44
+ `forge dev --seed --all-tenants`, and seed readiness evidence in dev and
45
+ field-test summaries.
46
+ - Update templates, docs, and tests around the new `create app -> add auth ->
47
+ field-test -> deploy` path.
48
+
3
49
  ## 0.1.0-alpha.41
4
50
 
5
51
  ### Patch Changes
@@ -194,8 +240,6 @@
194
240
  - Expand capability-map table detection for aliased `ctx.db` usage.
195
241
  - Wait through short-lived DeltaDB writer locks before reporting `FORGE_DELTA_BUSY`.
196
242
 
197
- ## Unreleased
198
-
199
243
  ## 0.1.0-alpha.25
200
244
 
201
245
  ### Patch Changes
package/docs/changelog.md CHANGED
@@ -6,6 +6,228 @@ The canonical source file in the repository is `CHANGELOG.md`.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.1.0-alpha.43
10
+
11
+ - Included `scripts/field-test-forgeos.mjs` in the published npm package so
12
+ `forge field-test run` works from generated apps installed from
13
+ `forgeos@alpha`, not only from the ForgeOS framework checkout.
14
+ - `forge field-test run` now resolves the harness from the current workspace
15
+ first and then from the installed ForgeOS package, with a clearer diagnostic
16
+ listing searched paths when neither location exists.
17
+ - Added regression coverage for running the field-test command from an app
18
+ workspace that does not contain a local `scripts/field-test-forgeos.mjs`.
19
+
20
+ ## 0.1.0-alpha.42
21
+
22
+ - Added the golden-path CLI alias `forge field-test run --realistic`, which
23
+ enables runtime, auth, and UI probes together and defaults to the
24
+ WorkOS-backed `vendor-access` path when no template/auth override is
25
+ provided.
26
+ - Added `forge deploy package --target docker` as the user-facing production
27
+ packaging command while keeping `forge deploy render docker` compatible; the
28
+ generated production README and deploy plan now point at `package`.
29
+ - Added `forge workos prove --file workos-seed.yml --json` as an aggregate
30
+ no-dashboard proof for WorkOS/AuthKit/FGA/seed readiness, with `--real`
31
+ applying hosted setup through the existing WorkOS CLI integration.
32
+ - `forge field-test report` now requires zero UI ergonomics warnings before
33
+ marking a UI-probed report ready for deploy checks, so product-surface
34
+ problems like demo copy, raw fetch errors, or exposed dev diagnostics cannot
35
+ pass as production-ready evidence.
36
+ - `forge inspect ui --ergonomics` now warns when a production-auth/WorkOS app
37
+ exposes local persona or dev-auth controls without explicitly separating
38
+ them as local development mode, reducing confusion between mock identity and
39
+ real AuthKit/OIDC auth.
40
+ - UI scenarios now support a `selectOption` step and the `vendor-access`
41
+ template generates browser scenarios for local sign-in, requester approval
42
+ denial, first-run seeded vendor data, and seed/reset controls, so field tests
43
+ can cover role-specific product flows instead of only loading `/`.
44
+ - `forge field-test report` now treats those `vendor-access` UI scenarios as
45
+ deploy-readiness evidence, requiring local sign-in, seeded-data,
46
+ requester-denied, and seed-control scenario names whenever UI probes run for
47
+ the template.
48
+ - `forge inspect ui --ergonomics` now warns with
49
+ `FORGE_UI_AUTO_SEED_RECOVERY_MISSING` when demo/sample seed commands exist
50
+ but the frontend does not appear to auto-recover an empty first-run
51
+ workspace, catching apps that open on an unseeded or broken-looking state.
52
+ - `forge ui doctor` and UI scenario runs now resolve Playwright from the app or
53
+ `web/` package root, infer npm/pnpm/bun/yarn setup commands from lockfiles,
54
+ and distinguish missing installs from missing Playwright dependencies instead
55
+ of always suggesting Bun commands.
56
+ - `forge field-test report` now treats `vendor-access` seed readiness as
57
+ deploy-ready only when `seed status` proves `autoSeedMode: "all-tenants"`,
58
+ catching regressions where domain probes pass but `npm run dev` would still
59
+ warm only the default tenant.
60
+ - `forge seed dev --all-tenants` and `forge seed reset --all-tenants` now
61
+ preserve successful per-tenant warnings in the aggregate `diagnostics`
62
+ payload, deduplicating repeated warning codes/messages while keeping full
63
+ per-tenant diagnostics under `tenantRuns`.
64
+ - `forge seed status` now warns with `FORGE_SEED_DEV_PARTIAL_TENANTS` when an
65
+ app exposes multiple local tenant/persona profiles but `npm run dev` only
66
+ uses `forge dev --seed` without `--all-tenants`, and it promotes
67
+ `forge dev --seed --all-tenants` as the first empty-workspace recovery.
68
+ - `forge dev --seed` startup summaries now surface seed warnings even when the
69
+ seed command itself succeeds, so partial multi-tenant seeding is visible in
70
+ the first dev-server payload and human terminal output.
71
+ - `forge seed status --json`, `forge dev --seed --json`, and field-test
72
+ reports now expose `autoSeedMode` (`none`, `default-tenant`, or
73
+ `all-tenants`) alongside the compatibility booleans `autoSeedOnDev` and
74
+ `autoSeedAllTenantsOnDev`, making it obvious when `npm run dev` warms every
75
+ discovered local tenant/persona instead of only the default tenant.
76
+ - The `vendor-access` starter now runs `forge dev --seed --all-tenants` from
77
+ `npm run dev`, so Acme and Globex local workspaces are warmed up by default
78
+ instead of leaving secondary tenant views empty until manual seeding.
79
+ - Human `forge dev --seed --all-tenants` startup output now lists per-tenant
80
+ seed results with labels and HTTP status, matching the structured startup
81
+ JSON evidence without requiring agents to rerun with `--json`.
82
+ - `forge inspect ui --ergonomics` now warns when a WorkOS/AuthKit frontend is
83
+ mounted but does not expose normalized `/session` claims or proxy the AuthKit
84
+ login/callback/logout/session routes, catching half-wired production auth
85
+ flows before browser testing.
86
+ - `forge inspect ui --ergonomics` now warns when Forge/WorkOS operational
87
+ diagnostics such as env names, seed files, claims dumps, capability maps, or
88
+ policy proofs appear in the primary product surface instead of a collapsible
89
+ developer panel.
90
+ - `forge inspect ui --ergonomics` now requires WorkOS-authenticated apps to
91
+ expose a visible WorkOS/AuthKit sign-in/sign-out path, `/login`/`/logout`
92
+ link, or AuthKit signIn/signOut call, so local-persona buttons or
93
+ organization/session copy alone no longer count as a real WorkOS auth flow.
94
+ - `forge workos seed --file ... --json` now writes a local
95
+ `.workos-seed-state.json` after successful hosted seed application or known
96
+ duplicate-resource/idempotent WorkOS responses, giving agents a stable,
97
+ secret-free proof that the seed was applied or already present.
98
+ - `forge workos doctor --json` and `forge workos seed --dry-run --json` now
99
+ read `.workos-seed-state.json`, report whether it matches the current
100
+ `workos-seed.yml`, and surface seed drift before an agent reapplies hosted
101
+ WorkOS changes.
102
+ - `forge workos setup --json` now surfaces the same seed-state summary at the
103
+ top level for dry-runs and real no-dashboard setup runs, so agents can see
104
+ hosted seed drift without digging through nested seed payloads.
105
+ - Human `forge workos setup --real` output now reports whether
106
+ `.workos-seed-state.json` matches the current seed after hosted setup,
107
+ keeping text-mode CLI handoffs aligned with JSON evidence.
108
+ - `forge workos doctor --json` now includes structured WorkOS coverage data
109
+ (`seed`, `seedState`, active policy permissions, expected resource types, and
110
+ missing/unused seed coverage) so agents can verify auth setup without parsing
111
+ human check text.
112
+ - `forge seed status --json` now reports seed readiness, including the selected
113
+ seed command, default local dev-auth headers, whether `npm run dev` already
114
+ auto-seeds through `forge dev --seed`, and exact recovery commands for empty
115
+ workspaces.
116
+ - `forge seed status --json` now discovers local frontend tenant/persona
117
+ profiles and emits per-tenant `forge seed dev`/`forge seed reset` commands,
118
+ making multi-tenant field apps easier to warm up and test without guessing
119
+ Acme/Globex headers.
120
+ - `forge seed dev --all-tenants` and `forge seed reset --all-tenants` now run
121
+ the selected seed command against every discovered local tenant/persona,
122
+ returning per-tenant request/response evidence for multi-tenant field tests.
123
+ - The `vendor-access` field-test runtime probe now uses
124
+ `forge seed dev --all-tenants` and accepts that single bulk-seed proof as the
125
+ deploy-readiness seed evidence, while still accepting older Acme/Globex
126
+ per-tenant report artifacts.
127
+ - `forge dev --seed --all-tenants` now forwards the discovered local
128
+ tenant/persona set into startup seeding and includes per-tenant seed run
129
+ evidence in the dev startup JSON summary.
130
+ - Generated-drift JSON now includes a concurrency note and normalized
131
+ sequential `generate`/`generate --check` commands, so agents do not mistake a
132
+ parallel `forge generate`/`forge generate --check` race for a persistent
133
+ generator defect.
134
+ - `forge dev --seed` startup output now includes the same seed readiness block
135
+ in `summary.seed.readiness`, so Studio and coding agents can diagnose empty
136
+ workspaces from the first dev-server payload.
137
+ - `forge seed` now normalizes recovery and diagnostic commands for the current
138
+ workspace, so framework checkouts show `node bin/forge.mjs ...` while
139
+ generated apps continue to show `forge ...`.
140
+ - `forge seed status` now recognizes auto-seeded dev scripts whether they call
141
+ `forge dev --seed`, `npm run forge -- dev --seed`, or the local
142
+ `bin/forge.mjs dev --seed` entrypoint.
143
+ - Human `forge seed` output now prints an `empty workspace recovery` section
144
+ with the same workspace-normalized commands exposed in JSON readiness.
145
+ - `forge field-test report` now treats `vendor-access` seed readiness as
146
+ deploy-check evidence, so reports must prove the app exposes deterministic
147
+ empty-workspace recovery commands before they are marked deploy-ready.
148
+ - Cleaned the `vendor-access` starter's local identity naming so the app uses
149
+ `LocalPersona`/workspace seed terminology instead of demo-auth terminology in
150
+ its authored frontend code and audit seed copy.
151
+ - `forge add auth workos` now treats already-declared WorkOS packages as an
152
+ idempotent no-op for package installation, emits
153
+ `FORGE_ADD_PACKAGE_ALREADY_DECLARED`, and continues adapter/AuthKit generation
154
+ instead of surfacing a misleading install failure.
155
+ - `forge add auth workos` now generates a browser session helper and rewrites
156
+ the `vendor-access` WorkOS shell to read normalized `/session` claims for
157
+ organization, role, and permissions. Vite/Next templates now proxy `/session`
158
+ alongside `/login`, `/callback`, and `/logout`.
159
+ - `forge workos doctor` now verifies the generated browser AuthKit bridge
160
+ exposes `useForgeWorkOSSession` and that web dev config proxies `/session`
161
+ with the AuthKit login/logout/callback routes, catching half-wired WorkOS
162
+ apps before browser testing.
163
+ - `forge workos doctor` and `forge workos seed` now report unused seed
164
+ permissions against the app's active policy permissions, making generic or
165
+ stale seed files visible without blocking intentionally broader seeds.
166
+ - `forge check` now fails fast on `defineTable(..., { id: "text" })` with
167
+ `FORGE_DB_INVALID_ID_FIELD`, before the app reaches confusing SQL/runtime
168
+ primary-key behavior. Omit `id` for generated UUID ids or use `id: "uuid"`.
169
+ - Field-test runtime probes now start `forge dev` with `--port 0` and
170
+ `--web-port 0`, then read the concrete API/web URLs from startup JSON instead
171
+ of pre-reserving ports in the harness.
172
+ - Hardened `forge inspect ui --ergonomics` so generated apps with runtime
173
+ commands/policies warn when they lack an obvious primary workflow action,
174
+ workflow navigation, permission feedback, or when ForgeOS/demo copy appears
175
+ in the main product surface instead of a collapsible dev panel.
176
+ - Tightened seed UX auditing so command names such as `seedVendorAccessDemo`
177
+ no longer count as a visible first-run recovery path; apps with seed commands
178
+ now need an actual seed/reset/status control or tenant-data recovery copy.
179
+ - Expanded UI ergonomics checks to catch `powered by ForgeOS` and
180
+ `ForgeOS ... demo` copy on the product surface, and cleaned starter template
181
+ first screens so generated apps open as useful products rather than framework
182
+ advertisements.
183
+ - Reduced UI auth-flow false positives: apps that merely support `jwt`/`oidc`
184
+ modes no longer look production-authenticated unless they set an active
185
+ production auth mode, use tenant-scoped data, or include a WorkOS integration.
186
+ - Updated the `minimal-web` starter with real workflow navigation and section
187
+ anchors so new apps no longer start with a UI ergonomics navigation warning.
188
+ - Made the `vendor-access` starter run `forge dev --seed` by default, with
189
+ `dev:no-seed` available for empty-state debugging.
190
+ - Fixed the `vendor-access` README quickstart so it tells users to run the
191
+ auto-seeded `npm run dev` script instead of appending a duplicate `--seed`
192
+ flag.
193
+ - Tightened the `vendor-access` dashboard queries so the root organization
194
+ record is loaded by the active tenant id instead of listing every demo
195
+ organization in the workspace.
196
+ - Strengthened the `vendor-access` field-test probes to fail when the
197
+ dashboard payload leaks the other tenant's root organization record, not just
198
+ the other tenant's vendors.
199
+ - Made the `vendor-access` starter retry automatic demo seeding after transient
200
+ frontend/API failures instead of marking a tenant as seeded before the seed
201
+ command succeeds.
202
+ - Hardened `forge field-test report` production evidence so
203
+ `readyForDeployCheck` requires concrete runtime health/entries probes, auth
204
+ setup commands, auth metadata endpoint probes, a web UI probe, and UI
205
+ ergonomics evidence instead of trusting enabled probe flags alone.
206
+ - Aligned `forge deploy check --production` with the stricter field-test
207
+ evidence contract, including explicit missing-evidence messages for runtime,
208
+ auth setup, auth metadata, UI, and ergonomics probes.
209
+ - Improved `forge add auth workos` for the `vendor-access` starter so real
210
+ WorkOS browser config bypasses the local identity selector and renders an
211
+ AuthKit-backed app shell, while retaining explicit local identity mode when
212
+ WorkOS env vars are absent.
213
+ - Simplified the `vendor-access` local login surface to a persona picker plus
214
+ local-mode continue action instead of a fake email/password form, making the
215
+ boundary between dev-header simulation and real WorkOS/AuthKit login clearer.
216
+ - Tightened UI ergonomics around auth demos: `forge inspect ui --ergonomics`
217
+ now warns on demo-login language and fake password-style auth forms in the
218
+ primary app shell, and the `vendor-access` template labels local identity and
219
+ workspace seed controls without fake credential copy.
220
+ - Field-test reports created with `--ui-probes` now include UI ergonomics audit
221
+ evidence, and `forge deploy check --production` requires that evidence while
222
+ surfacing UX warnings separately from runtime/auth failures.
223
+ - Field-test UI probes now reject obvious broken first-screen HTML such as
224
+ `Failed to fetch`, `No organization seeded`, and raw Forge runtime errors
225
+ instead of treating any reachable Vite/Next/Nuxt shell as product evidence.
226
+ - `forge field-test report` now requires the `vendor-access` app's concrete
227
+ multi-tenant domain probes before marking field-test evidence deploy-ready:
228
+ seed Acme/Globex, query both tenants, allow owner approval, deny requester
229
+ approval, and deny cross-tenant approval.
230
+
9
231
  ## 0.1.0-alpha.41
10
232
 
11
233
  - Fixed package install detection for npm workspace apps that hoist frontend
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgeos",
3
- "version": "0.1.0-alpha.41",
3
+ "version": "0.1.0-alpha.43",
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",
@@ -10,6 +10,7 @@
10
10
  "!adapters/**/*.class",
11
11
  "!adapters/**/*.jar",
12
12
  "bin/",
13
+ "scripts/field-test-forgeos.mjs",
13
14
  "docs/cair-protocol.md",
14
15
  "docs/forge-protocol.md",
15
16
  "examples/go-billing/",