forgeos 0.1.0-alpha.0 → 0.1.0-alpha.2
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/.npmignore +9 -1
- package/AGENTS.md +6 -1
- package/CHANGELOG.md +30 -0
- package/CONTRIBUTING.md +22 -1
- package/README.md +30 -3
- package/bin/forge.mjs +4 -3
- package/package.json +3 -1
- package/packages/eslint-plugin-forge/index.ts +15 -15
- package/packages/eslint-plugin-forge/package.json +10 -10
- package/packages/eslint-plugin-forge/src/check-source.ts +95 -95
- package/packages/eslint-plugin-forge/src/load-artifacts.ts +24 -24
- package/packages/eslint-plugin-forge/src/rule-no-forge-guard-violation.ts +93 -93
- package/src/forge/_generated/actionSubscriptions.json +2 -2
- package/src/forge/_generated/actionSubscriptions.ts +3 -3
- package/src/forge/_generated/agentAdapterManifest.json +2 -2
- package/src/forge/_generated/agentAdapterManifest.ts +3 -3
- package/src/forge/_generated/agentContract.json +2 -2
- package/src/forge/_generated/agentContract.ts +6786 -2
- package/src/forge/_generated/agentQuickstart.md +1 -1
- package/src/forge/_generated/aiContext.ts +1 -1
- package/src/forge/_generated/aiModels.json +1 -1
- package/src/forge/_generated/aiModels.ts +1 -1
- package/src/forge/_generated/aiProviders.json +1 -1
- package/src/forge/_generated/aiProviders.ts +1 -1
- package/src/forge/_generated/aiRegistry.json +2 -2
- package/src/forge/_generated/aiRegistry.ts +3 -3
- package/src/forge/_generated/api.json +2 -2
- package/src/forge/_generated/api.ts +1 -1
- package/src/forge/_generated/appGraph.json +2 -2
- package/src/forge/_generated/appGraph.ts +1297 -1141
- package/src/forge/_generated/appMap.md +1 -1
- package/src/forge/_generated/artifactManifest.json +2 -2
- package/src/forge/_generated/artifactManifest.ts +2 -2
- package/src/forge/_generated/authClaims.json +1 -1
- package/src/forge/_generated/authClaims.ts +1 -1
- package/src/forge/_generated/authConfig.json +1 -1
- package/src/forge/_generated/authConfig.ts +1 -1
- package/src/forge/_generated/authContext.ts +1 -1
- package/src/forge/_generated/authRegistry.json +1 -1
- package/src/forge/_generated/authRegistry.ts +1 -1
- package/src/forge/_generated/buildInfo.json +2 -2
- package/src/forge/_generated/buildInfo.ts +4 -4
- package/src/forge/_generated/capabilityMap.json +2 -2
- package/src/forge/_generated/capabilityMap.md +1 -1
- package/src/forge/_generated/capabilityMap.ts +2 -2
- package/src/forge/_generated/client.ts +1 -1
- package/src/forge/_generated/clientApi.ts +1 -1
- package/src/forge/_generated/clientManifest.json +2 -2
- package/src/forge/_generated/clientManifest.ts +3 -3
- package/src/forge/_generated/clientTypes.ts +1 -1
- package/src/forge/_generated/configRegistry.json +1 -1
- package/src/forge/_generated/configRegistry.ts +1 -1
- package/src/forge/_generated/dataGraph.json +2 -2
- package/src/forge/_generated/dataGraph.ts +3 -3
- package/src/forge/_generated/db.json +1 -1
- package/src/forge/_generated/db.ts +1 -1
- package/src/forge/_generated/dbSecurityManifest.json +1 -1
- package/src/forge/_generated/dbSecurityManifest.ts +1 -1
- package/src/forge/_generated/dbSessionContext.json +1 -1
- package/src/forge/_generated/dbSessionContext.ts +1 -1
- package/src/forge/_generated/deployManifest.json +2 -2
- package/src/forge/_generated/deployManifest.ts +7 -7
- package/src/forge/_generated/devManifest.json +2 -2
- package/src/forge/_generated/devManifest.ts +3 -3
- package/src/forge/_generated/envSchema.json +1 -1
- package/src/forge/_generated/envSchema.ts +1 -1
- package/src/forge/_generated/frontendGraph.json +1 -1
- package/src/forge/_generated/frontendGraph.ts +1 -1
- package/src/forge/_generated/importGuards.json +2 -2
- package/src/forge/_generated/importGuards.ts +35 -1
- package/src/forge/_generated/index.ts +1 -1
- package/src/forge/_generated/liveProductionManifest.json +1 -1
- package/src/forge/_generated/liveProductionManifest.ts +1 -1
- package/src/forge/_generated/liveProtocol.json +1 -1
- package/src/forge/_generated/liveProtocol.ts +1 -1
- package/src/forge/_generated/liveQueryRegistry.json +2 -2
- package/src/forge/_generated/liveQueryRegistry.ts +3 -3
- package/src/forge/_generated/liveTransportConfig.json +1 -1
- package/src/forge/_generated/liveTransportConfig.ts +1 -1
- package/src/forge/_generated/makeRegistry.json +2 -2
- package/src/forge/_generated/makeRegistry.ts +2 -2
- package/src/forge/_generated/makeTemplates.json +1 -1
- package/src/forge/_generated/makeTemplates.ts +1 -1
- package/src/forge/_generated/mockMap.json +1 -1
- package/src/forge/_generated/mockMap.ts +1 -1
- package/src/forge/_generated/operationPlaybooks.md +7 -5
- package/src/forge/_generated/packageGraph.json +2 -2
- package/src/forge/_generated/packageGraph.ts +90964 -14284
- package/src/forge/_generated/packageUpgradeRegistry.json +2 -2
- package/src/forge/_generated/packageUpgradeRegistry.ts +2 -2
- package/src/forge/_generated/permissionMatrix.json +2 -2
- package/src/forge/_generated/permissionMatrix.ts +3 -3
- package/src/forge/_generated/policyRegistry.json +2 -2
- package/src/forge/_generated/policyRegistry.ts +3 -3
- package/src/forge/_generated/queryRegistry.json +2 -2
- package/src/forge/_generated/queryRegistry.ts +3 -3
- package/src/forge/_generated/react.d.ts +1 -1
- package/src/forge/_generated/react.ts +1 -1
- package/src/forge/_generated/reactManifest.json +2 -2
- package/src/forge/_generated/reactManifest.ts +3 -3
- package/src/forge/_generated/releaseManifest.json +2 -2
- package/src/forge/_generated/releaseManifest.ts +3 -3
- package/src/forge/_generated/rlsPolicies.json +1 -1
- package/src/forge/_generated/rlsPolicies.sql +1 -1
- package/src/forge/_generated/rlsPolicies.ts +1 -1
- package/src/forge/_generated/runtimeGraph.json +2 -2
- package/src/forge/_generated/runtimeGraph.ts +3 -3
- package/src/forge/_generated/runtimeMatrix.json +2 -2
- package/src/forge/_generated/runtimeMatrix.ts +106177 -7917
- package/src/forge/_generated/runtimeRegistry.ts +1 -1
- package/src/forge/_generated/runtimeRules.md +1 -1
- package/src/forge/_generated/secretRegistry.json +1 -1
- package/src/forge/_generated/secretRegistry.ts +1 -1
- package/src/forge/_generated/secretsContext.ts +1 -1
- package/src/forge/_generated/serverApi.ts +1 -1
- package/src/forge/_generated/sourceMapManifest.json +2 -2
- package/src/forge/_generated/sourceMapManifest.ts +2 -2
- package/src/forge/_generated/sqlPlan.json +1 -1
- package/src/forge/_generated/sqlPlan.ts +1 -1
- package/src/forge/_generated/subscriptionManifest.json +2 -2
- package/src/forge/_generated/subscriptionManifest.ts +3 -3
- package/src/forge/_generated/symbolicationManifest.json +2 -2
- package/src/forge/_generated/symbolicationManifest.ts +2 -2
- package/src/forge/_generated/telemetryRegistry.json +2 -2
- package/src/forge/_generated/telemetryRegistry.ts +3 -3
- package/src/forge/_generated/telemetrySinks.json +2 -2
- package/src/forge/_generated/telemetrySinks.ts +2 -2
- package/src/forge/_generated/tenantScope.json +2 -2
- package/src/forge/_generated/tenantScope.ts +3 -3
- package/src/forge/_generated/testGraph.json +2 -2
- package/src/forge/_generated/testGraph.ts +129 -75
- package/src/forge/_generated/testPlanRegistry.json +2 -2
- package/src/forge/_generated/testPlanRegistry.ts +2 -2
- package/src/forge/_generated/uiRoutes.json +1 -1
- package/src/forge/_generated/uiRoutes.ts +1 -1
- package/src/forge/_generated/uiScenarios.json +1 -1
- package/src/forge/_generated/uiScenarios.ts +1 -1
- package/src/forge/_generated/uiTestManifest.json +2 -2
- package/src/forge/_generated/uiTestManifest.ts +2 -2
- package/src/forge/_generated/workflowRegistry.json +2 -2
- package/src/forge/_generated/workflowRegistry.ts +3 -3
- package/src/forge/_generated/workflowSubscriptions.json +2 -2
- package/src/forge/_generated/workflowSubscriptions.ts +3 -3
- package/src/forge/cli/commands.ts +861 -861
- package/src/forge/cli/deps.ts +178 -11
- package/src/forge/cli/dev.ts +32 -5
- package/src/forge/cli/index.ts +7 -7
- package/src/forge/cli/main.ts +54 -54
- package/src/forge/cli/new.ts +29 -1
- package/src/forge/cli/output.ts +97 -97
- package/src/forge/cli/parse.ts +679 -673
- package/src/forge/cli/version.ts +1 -1
- package/src/forge/compiler/agent-contract/build.ts +28 -0
- package/src/forge/compiler/agent-contract/types.ts +16 -0
- package/src/forge/compiler/app-graph/build.ts +112 -112
- package/src/forge/compiler/app-graph/classify.ts +10 -10
- package/src/forge/compiler/app-graph/dup-symbol.ts +29 -29
- package/src/forge/compiler/app-graph/extract.ts +123 -123
- package/src/forge/compiler/app-graph/forge-apis.ts +29 -29
- package/src/forge/compiler/app-graph/index.ts +11 -11
- package/src/forge/compiler/app-graph/module-graph.ts +316 -316
- package/src/forge/compiler/app-graph/parser.ts +119 -119
- package/src/forge/compiler/app-graph/symbols.ts +48 -48
- package/src/forge/compiler/app-graph/tsconfig-hash.ts +62 -62
- package/src/forge/compiler/app-graph/types.ts +43 -43
- package/src/forge/compiler/app-graph/versions.ts +14 -14
- package/src/forge/compiler/cache/index.ts +17 -17
- package/src/forge/compiler/cache/key.ts +46 -46
- package/src/forge/compiler/cache/scheduler.ts +72 -72
- package/src/forge/compiler/cache/store.ts +78 -78
- package/src/forge/compiler/classifier/capabilities.ts +78 -78
- package/src/forge/compiler/classifier/classify.ts +113 -113
- package/src/forge/compiler/classifier/contexts.ts +188 -188
- package/src/forge/compiler/classifier/index.ts +18 -18
- package/src/forge/compiler/classifier/runtime-matrix.ts +45 -45
- package/src/forge/compiler/classifier/secrets.ts +41 -41
- package/src/forge/compiler/classifier/signals.ts +129 -129
- package/src/forge/compiler/diagnostics/codes.ts +125 -120
- package/src/forge/compiler/diagnostics/create.ts +87 -87
- package/src/forge/compiler/diagnostics/index.ts +41 -41
- package/src/forge/compiler/emitter/artifact-kind.ts +14 -14
- package/src/forge/compiler/emitter/barrel.ts +38 -38
- package/src/forge/compiler/emitter/constants.ts +7 -7
- package/src/forge/compiler/emitter/emit.ts +234 -237
- package/src/forge/compiler/emitter/index.ts +24 -24
- package/src/forge/compiler/emitter/lock.ts +61 -61
- package/src/forge/compiler/emitter/render.ts +73 -73
- package/src/forge/compiler/guards/artifacts.ts +96 -96
- package/src/forge/compiler/guards/check-import-guards.ts +106 -106
- package/src/forge/compiler/guards/index.ts +11 -11
- package/src/forge/compiler/guards/propagate-contexts.ts +57 -57
- package/src/forge/compiler/index.ts +17 -17
- package/src/forge/compiler/integration/add.ts +493 -493
- package/src/forge/compiler/integration/index.ts +17 -17
- package/src/forge/compiler/integration/plan.ts +279 -279
- package/src/forge/compiler/integration/render.ts +189 -189
- package/src/forge/compiler/integration/snapshot.ts +52 -52
- package/src/forge/compiler/orchestrator/discover.ts +214 -214
- package/src/forge/compiler/orchestrator/guards.ts +5 -5
- package/src/forge/compiler/orchestrator/index.ts +27 -27
- package/src/forge/compiler/orchestrator/manifest.ts +69 -69
- package/src/forge/compiler/orchestrator/orphans.ts +51 -51
- package/src/forge/compiler/orchestrator/plan.ts +804 -804
- package/src/forge/compiler/orchestrator/run.ts +178 -178
- package/src/forge/compiler/orchestrator/serialize.ts +859 -859
- package/src/forge/compiler/orchestrator/types.ts +23 -23
- package/src/forge/compiler/orchestrator/verify.ts +35 -35
- package/src/forge/compiler/package-graph/capabilities-stub.ts +33 -33
- package/src/forge/compiler/package-graph/checksum.ts +107 -97
- package/src/forge/compiler/package-graph/compiler.ts +444 -363
- package/src/forge/compiler/package-graph/constants.ts +4 -4
- package/src/forge/compiler/package-graph/exports-discovery.ts +91 -84
- package/src/forge/compiler/package-graph/extract-dts.ts +32 -32
- package/src/forge/compiler/package-graph/index.ts +24 -24
- package/src/forge/compiler/package-graph/jsdoc.ts +50 -50
- package/src/forge/compiler/package-graph/oracle.ts +326 -0
- package/src/forge/compiler/package-graph/read-file.ts +21 -21
- package/src/forge/compiler/package-graph/resolve.ts +131 -127
- package/src/forge/compiler/package-manager/adapter.ts +232 -232
- package/src/forge/compiler/package-manager/commands.ts +47 -47
- package/src/forge/compiler/package-manager/detect.ts +65 -65
- package/src/forge/compiler/package-manager/executor.ts +29 -29
- package/src/forge/compiler/package-manager/index.ts +22 -22
- package/src/forge/compiler/package-manager/parse-spec.ts +16 -16
- package/src/forge/compiler/package-manager/version.ts +20 -20
- package/src/forge/compiler/primitives/compare.ts +26 -26
- package/src/forge/compiler/primitives/hash.ts +42 -33
- package/src/forge/compiler/primitives/header.ts +43 -43
- package/src/forge/compiler/primitives/index.ts +45 -45
- package/src/forge/compiler/primitives/paths.ts +24 -24
- package/src/forge/compiler/primitives/serialize.ts +66 -66
- package/src/forge/compiler/primitives/sort.ts +87 -87
- package/src/forge/compiler/recipes/definitions.ts +269 -269
- package/src/forge/compiler/recipes/helpers.ts +37 -37
- package/src/forge/compiler/recipes/index.ts +21 -21
- package/src/forge/compiler/recipes/registry.ts +87 -87
- package/src/forge/compiler/sandbox/artifact-sanitize.ts +26 -26
- package/src/forge/compiler/sandbox/backends/child.ts +123 -123
- package/src/forge/compiler/sandbox/backends/docker.ts +173 -173
- package/src/forge/compiler/sandbox/index.ts +51 -51
- package/src/forge/compiler/sandbox/inspect.ts +143 -143
- package/src/forge/compiler/sandbox/inspector-entry.ts +115 -115
- package/src/forge/compiler/sandbox/limits.ts +31 -31
- package/src/forge/compiler/sandbox/scrub-env.ts +60 -60
- package/src/forge/compiler/sandbox/secret-scan.ts +54 -54
- package/src/forge/compiler/sandbox/serialize.ts +106 -106
- package/src/forge/compiler/sandbox/types.ts +7 -7
- package/src/forge/compiler/types/app-graph.ts +71 -71
- package/src/forge/compiler/types/capability.ts +29 -29
- package/src/forge/compiler/types/classification.ts +9 -9
- package/src/forge/compiler/types/cli.ts +85 -85
- package/src/forge/compiler/types/diagnostic.ts +2 -2
- package/src/forge/compiler/types/emit.ts +25 -25
- package/src/forge/compiler/types/import-guards.ts +19 -19
- package/src/forge/compiler/types/index.ts +98 -98
- package/src/forge/compiler/types/integration.ts +25 -25
- package/src/forge/compiler/types/json.ts +3 -3
- package/src/forge/compiler/types/lock.ts +37 -37
- package/src/forge/compiler/types/package-graph.ts +122 -77
- package/src/forge/compiler/types/runtime-matrix.ts +16 -16
- package/src/forge/compiler/types/runtime.ts +30 -30
- package/src/forge/compiler/types/sandbox.ts +24 -24
- package/src/forge/dev/server.ts +16 -2
- package/src/forge/refactor/index.ts +10 -2
- package/src/forge/refactor/runtime-rename.ts +598 -0
- package/src/forge/runtime/executor.ts +3 -2
- package/src/forge/runtime/live/live-query-runner.ts +2 -1
- package/src/forge/runtime/outbox/process.ts +2 -1
- package/src/forge/runtime/query/run-query.ts +2 -1
- package/src/forge/runtime/runner/run-entry.ts +2 -1
- package/src/forge/runtime/telemetry/sinks/posthog.ts +4 -5
- package/src/forge/runtime/telemetry/sinks/sentry.ts +4 -5
- package/src/forge/runtime/workflows/resolve-step.ts +2 -1
- package/src/forge/version.ts +3 -0
- package/templates/b2b-support-web/src/actions/captureTicketCreated.ts +7 -2
- package/templates/b2b-support-web/src/commands/closeTicket.ts +6 -1
- package/templates/b2b-support-web/src/commands/createTicket.ts +8 -2
- package/templates/b2b-support-web/src/queries/getTicket.ts +8 -1
- package/templates/b2b-support-web/web/components/CreateTicketForm.tsx +1 -2
- package/templates/b2b-support-web/web/components/PolicyDeniedDemo.tsx +1 -2
- package/templates/b2b-support-web/web/components/TicketList.tsx +1 -2
- package/templates/b2b-support-web/web/components/TraceDetails.tsx +1 -1
- package/templates/b2b-support-web/web/lib/forge.ts +1 -0
package/.npmignore
CHANGED
package/AGENTS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @forge-generated generator=0.0.
|
|
1
|
+
// @forge-generated generator=0.1.0-alpha.2 input=2ce189e4d3555acfca07eb3bb3d103b22a8da52f3c26f9ac2197254f0563234f content=e0bf36433d915daf5ad06ac6265b3ac6f2cd1706269c69618bbbc1cb1f44e465
|
|
2
2
|
# AGENTS.md
|
|
3
3
|
|
|
4
4
|
<!-- forge-generated:start -->
|
|
@@ -69,6 +69,9 @@ forge inspect app --json
|
|
|
69
69
|
forge inspect all --json
|
|
70
70
|
forge inspect frontend --json
|
|
71
71
|
forge inspect capabilities --json
|
|
72
|
+
forge deps inspect <package> --json
|
|
73
|
+
forge deps api <package> <symbol> --json
|
|
74
|
+
forge deps trace <package> --json
|
|
72
75
|
forge auth check --json
|
|
73
76
|
forge inspect runtime-matrix --json
|
|
74
77
|
forge inspect policies --json
|
|
@@ -250,6 +253,8 @@ Use:
|
|
|
250
253
|
|
|
251
254
|
```bash
|
|
252
255
|
forge deps upgrade-plan <package> --to latest
|
|
256
|
+
forge deps inspect <package> --json
|
|
257
|
+
forge deps api <package> <symbol> --json
|
|
253
258
|
forge deps upgrade-apply <plan>
|
|
254
259
|
forge verify --strict
|
|
255
260
|
```
|
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
# forgeos
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.2
|
|
4
|
+
|
|
5
|
+
Windows and generated-app hardening:
|
|
6
|
+
|
|
7
|
+
- Fixed Node ESM handler loading on Windows by importing generated app modules
|
|
8
|
+
through `file://` URLs across commands, queries, liveQueries, outbox actions,
|
|
9
|
+
workflow steps, mocks, and telemetry adapters.
|
|
10
|
+
- Fixed `forge dev` SSE streaming on the Node HTTP fallback so liveQuery
|
|
11
|
+
snapshots are flushed immediately instead of buffering forever.
|
|
12
|
+
- Hardened generated app scaffolding and web dev spawning on Windows.
|
|
13
|
+
- Updated the B2B support template to route frontend imports through
|
|
14
|
+
`web/lib/forge.ts` and use safer handler input validation.
|
|
15
|
+
- Added focused tests for Node compatibility, template scaffolding, runtime
|
|
16
|
+
imports, and streaming responses.
|
|
17
|
+
|
|
18
|
+
## 0.1.0-alpha.1
|
|
19
|
+
|
|
20
|
+
Republish alpha with the dependency/API oracle improvements:
|
|
21
|
+
|
|
22
|
+
- Added dependency API inspection commands for agents:
|
|
23
|
+
`forge deps api`, `forge deps trace`, and `forge deps runtime-compat`.
|
|
24
|
+
- Added dependency API summaries to `agentContract.json`.
|
|
25
|
+
- Added package resolution traces, runtime compatibility metadata, and
|
|
26
|
+
runtime/type mismatch diagnostics to `packageGraph`.
|
|
27
|
+
- Reduced package graph warning noise for `package.json` metadata exports,
|
|
28
|
+
declaration-file subpaths, and pattern exports.
|
|
29
|
+
|
|
3
30
|
## 0.1.0-alpha.0
|
|
4
31
|
|
|
5
32
|
Initial alpha packaging baseline for ForgeOS.
|
|
6
33
|
|
|
7
34
|
This release line is intended to validate npm installation, the `forge` CLI binary,
|
|
8
35
|
template creation, generated contracts, and the agent-native local development loop.
|
|
36
|
+
|
|
37
|
+
Added ReadTheDocs-ready public documentation, generator/package version alignment
|
|
38
|
+
checks, and a broad generated-app field-test harness for release hardening.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -9,8 +9,29 @@ bun run typecheck
|
|
|
9
9
|
bun test --timeout 120000
|
|
10
10
|
node ./bin/forge.mjs verify --standard --script-timeout-ms 120000
|
|
11
11
|
npm run release:smoke
|
|
12
|
+
npm run field:test -- --dry-run --json
|
|
12
13
|
```
|
|
13
14
|
|
|
15
|
+
Run a real external-app smoke before release candidates:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm run field:test -- --package-managers npm --templates minimal-web --forge-spec "file:." --install --json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Use the GitHub Actions `Field Tests` workflow for the broader OS, Node, package-manager matrix.
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
Public docs are built with MkDocs on ReadTheDocs. The configuration lives in:
|
|
26
|
+
|
|
27
|
+
```txt
|
|
28
|
+
.readthedocs.yaml
|
|
29
|
+
mkdocs.yml
|
|
30
|
+
docs/**
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Keep `docs/getting-started.md`, `docs/cli.md`, and `docs/field-testing.md` current when changing install, template, or verification behavior.
|
|
34
|
+
|
|
14
35
|
## Changesets
|
|
15
36
|
|
|
16
37
|
For changes that should be published, add a changeset:
|
|
@@ -36,7 +57,7 @@ Configure the npm package `forgeos` with:
|
|
|
36
57
|
| Environment | blank |
|
|
37
58
|
| Allowed action | `npm publish` |
|
|
38
59
|
|
|
39
|
-
Do not configure `NPM_TOKEN` for normal releases. The publish workflow uses GitHub OIDC with `id-token: write`, Node 24, npm 11+, and provenance.
|
|
60
|
+
Do not configure `NPM_TOKEN` for normal releases. The publish workflow uses GitHub OIDC with `id-token: write`, Node 24, npm 11+, and provenance. In npm package settings, prefer "Require two-factor authentication and disallow tokens"; Trusted Publishers continue to work with that stricter token setting.
|
|
40
61
|
|
|
41
62
|
## Manual Publish
|
|
42
63
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Agent-native application framework and compiler for building Forge apps without a mandatory dashboard. ForgeOS turns application source into deterministic runtime contracts, generated clients, safety checks, and machine-readable context that humans and AI coding agents can use safely.
|
|
4
4
|
|
|
5
|
-
**Status:** private MVP, implemented through H42. The core compiler, local runtime, frontend SDK, production auth, RLS compiler, repair/review loops, UI test bridge, guided intent router, full-stack capability map, clean templates, faster generated checks, showcase app, Windows-safe Bun resolution, native Windows diagnostics/setup, Node-compatible CLI/runtime paths, observable verify timeouts, multi-OS Node CI smoke, release packaging smoke, AST-aware codemods for `extract-action`, `rename field`, and `rename table`, and quieter template workspaces are present. Public release still
|
|
5
|
+
**Status:** private/public alpha MVP, implemented through H42. The core compiler, local runtime, frontend SDK, production auth, RLS compiler, repair/review loops, UI test bridge, guided intent router, full-stack capability map, clean templates, faster generated checks, showcase app, Windows-safe Bun resolution, native Windows diagnostics/setup, Node-compatible CLI/runtime paths, observable verify timeouts, multi-OS Node CI smoke, release packaging smoke, npm alpha publishing, Trusted Publisher/OIDC release wiring, ReadTheDocs-ready public docs, package/version-aligned generator metadata, AST-aware codemods for `extract-action`, `rename field`, and `rename table`, broader field-test automation, and quieter template workspaces are present. Public release hardening is still focused on deeper semantic codemods and more real-project field reports.
|
|
6
|
+
|
|
7
|
+
Public docs are configured for ReadTheDocs with `.readthedocs.yaml` and `mkdocs.yml`. The local docs entrypoint is `docs/index.md`.
|
|
6
8
|
|
|
7
9
|
## Agent-First Quickstart
|
|
8
10
|
|
|
@@ -42,6 +44,22 @@ These files describe the app surface, runtime rules, generated files, policies,
|
|
|
42
44
|
|
|
43
45
|
## Create a Test App
|
|
44
46
|
|
|
47
|
+
Public one-command app creation:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm create forge-app@alpha notes-app -- --template minimal-web
|
|
51
|
+
cd notes-app
|
|
52
|
+
npm run dev
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Equivalent lower-level command without installing ForgeOS globally:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm exec --package forgeos@alpha -- forge new notes-app --template minimal-web --package-manager npm
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If ForgeOS is already installed or you are inside this repository:
|
|
62
|
+
|
|
45
63
|
```bash
|
|
46
64
|
forge new notes-app --template minimal-web --package-manager npm
|
|
47
65
|
cd notes-app
|
|
@@ -56,11 +74,20 @@ Templates also include workspace editor excludes for generated/runtime directori
|
|
|
56
74
|
For release or external smoke testing, choose the Forge package source explicitly:
|
|
57
75
|
|
|
58
76
|
```bash
|
|
59
|
-
forge new smoke-app --template minimal-web --package-manager npm --forge-spec "npm:forgeos
|
|
77
|
+
forge new smoke-app --template minimal-web --package-manager npm --forge-spec "npm:forgeos@alpha"
|
|
60
78
|
forge new local-app --template minimal-web --package-manager npm --local-forge
|
|
61
79
|
```
|
|
62
80
|
|
|
63
|
-
`--forge-spec` writes that dependency spec into the generated app, while `--local-forge` keeps the monorepo/local package workflow. The npm package is published as `forgeos`, but generated apps keep the dependency key, CLI binary, and import surface as `forge` (`forge`, `forge/server`, `forge/react`) by using npm alias specs such as `"forge": "npm:forgeos
|
|
81
|
+
`--forge-spec` writes that dependency spec into the generated app, while `--local-forge` keeps the monorepo/local package workflow. The npm package is published as `forgeos`, but generated apps keep the dependency key, CLI binary, and import surface as `forge` (`forge`, `forge/server`, `forge/react`) by using npm alias specs such as `"forge": "npm:forgeos@alpha"`. CI uses both `--forge-spec "file:$GITHUB_WORKSPACE"` and a packed tarball smoke to prove freshly created apps can install ForgeOS and run outside the framework workspace.
|
|
82
|
+
|
|
83
|
+
For broader field testing:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm run field:test -- --dry-run --json
|
|
87
|
+
npm run field:test -- --package-managers npm --templates minimal-web --forge-spec "file:." --install --json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The scheduled/manual `Field Tests` workflow expands that coverage across Linux, macOS, Windows, Node 22, Node 24, and npm/pnpm/yarn/bun.
|
|
64
91
|
|
|
65
92
|
## What ForgeOS Generates
|
|
66
93
|
|
package/bin/forge.mjs
CHANGED
|
@@ -5,15 +5,16 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
5
5
|
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
6
6
|
const entrypoint = join(root, "src", "forge", "cli", "main.ts");
|
|
7
7
|
|
|
8
|
-
let
|
|
8
|
+
let register;
|
|
9
9
|
try {
|
|
10
|
-
({
|
|
10
|
+
({ register } = await import("tsx/esm/api"));
|
|
11
11
|
} catch {
|
|
12
12
|
console.error("error: Forge requires the 'tsx' package to run under Node.");
|
|
13
13
|
console.error("Install dependencies with your package manager, then retry.");
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
register();
|
|
18
|
+
const module = await import(pathToFileURL(entrypoint).href);
|
|
18
19
|
const exitCode = await module.main(process.argv.slice(2));
|
|
19
20
|
process.exit(exitCode);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forgeos",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "Agent-native application framework and compiler for building Forge apps without a mandatory dashboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"release:pack": "npm pack --dry-run",
|
|
38
38
|
"release:smoke": "node scripts/smoke-packed-package.mjs",
|
|
39
39
|
"release:publish-local-alpha": "node scripts/publish-local-alpha.mjs",
|
|
40
|
+
"field:test": "node scripts/field-test-forgeos.mjs",
|
|
40
41
|
"forge": "node ./bin/forge.mjs",
|
|
41
42
|
"forge:node": "node ./bin/forge.mjs",
|
|
42
43
|
"forge:bun": "node ./bin/forge-bun.mjs src/forge/cli/main.ts",
|
|
@@ -88,6 +89,7 @@
|
|
|
88
89
|
"@changesets/changelog-github": "^0.7.0",
|
|
89
90
|
"@changesets/cli": "^2.31.0",
|
|
90
91
|
"@types/bun": "1.3.14",
|
|
92
|
+
"@types/node": "^24.0.0",
|
|
91
93
|
"@types/react": "^19.2.17",
|
|
92
94
|
"@types/react-test-renderer": "^19.1.0",
|
|
93
95
|
"fast-check": "^3.23.2",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export {
|
|
2
|
-
loadForgeGuardArtifacts,
|
|
3
|
-
type ForgeGuardArtifacts,
|
|
4
|
-
} from "./src/load-artifacts.ts";
|
|
5
|
-
export {
|
|
6
|
-
checkSourceForgeGuards,
|
|
7
|
-
type ForgeGuardSourceViolation,
|
|
8
|
-
} from "./src/check-source.ts";
|
|
9
|
-
export {
|
|
10
|
-
runForgeGuardRule,
|
|
11
|
-
forgeGuardRuleDefinition,
|
|
12
|
-
formatViolationMessage,
|
|
13
|
-
type ForgeEslintContext,
|
|
14
|
-
type ForgeEslintSettings,
|
|
15
|
-
} from "./src/rule-no-forge-guard-violation.ts";
|
|
1
|
+
export {
|
|
2
|
+
loadForgeGuardArtifacts,
|
|
3
|
+
type ForgeGuardArtifacts,
|
|
4
|
+
} from "./src/load-artifacts.ts";
|
|
5
|
+
export {
|
|
6
|
+
checkSourceForgeGuards,
|
|
7
|
+
type ForgeGuardSourceViolation,
|
|
8
|
+
} from "./src/check-source.ts";
|
|
9
|
+
export {
|
|
10
|
+
runForgeGuardRule,
|
|
11
|
+
forgeGuardRuleDefinition,
|
|
12
|
+
formatViolationMessage,
|
|
13
|
+
type ForgeEslintContext,
|
|
14
|
+
type ForgeEslintSettings,
|
|
15
|
+
} from "./src/rule-no-forge-guard-violation.ts";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-forge",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./index.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.ts"
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "eslint-plugin-forge",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.ts"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { lookupMatrixEntry } from "../../../src/forge/compiler/classifier/runtime-matrix.ts";
|
|
2
|
-
import type { ImportGuardsArtifact } from "../../../src/forge/compiler/types/import-guards.ts";
|
|
3
|
-
import type { RuntimeContext } from "../../../src/forge/compiler/types/runtime.ts";
|
|
4
|
-
import type { RuntimeMatrix } from "../../../src/forge/compiler/types/runtime-matrix.ts";
|
|
5
|
-
import { parsePackageSpecifier } from "../../../src/forge/compiler/app-graph/module-graph.ts";
|
|
6
|
-
|
|
7
|
-
export interface ForgeGuardSourceViolation {
|
|
8
|
-
packageName: string;
|
|
9
|
-
context: RuntimeContext;
|
|
10
|
-
rationale: string;
|
|
11
|
-
line: number;
|
|
12
|
-
column: number;
|
|
13
|
-
endColumn: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const IMPORT_PATTERN =
|
|
17
|
-
/(?:import\s+(?:type\s+)?(?:[\w*{}\s,]+from\s+)?|export\s+(?:type\s+)?(?:[\w*{}\s,]+from\s+)?)['"]([^'"]+)['"]|require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
18
|
-
|
|
19
|
-
function lineColumnAtOffset(
|
|
20
|
-
source: string,
|
|
21
|
-
offset: number,
|
|
22
|
-
): { line: number; column: number } {
|
|
23
|
-
const before = source.slice(0, offset);
|
|
24
|
-
const lines = before.split("\n");
|
|
25
|
-
return {
|
|
26
|
-
line: lines.length,
|
|
27
|
-
column: (lines.at(-1)?.length ?? 0) + 1,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function effectiveContextsForFile(
|
|
32
|
-
file: string,
|
|
33
|
-
guards: ImportGuardsArtifact,
|
|
34
|
-
): RuntimeContext[] {
|
|
35
|
-
const normalized = file.replace(/\\/g, "/");
|
|
36
|
-
const entry = guards.moduleContexts.find(
|
|
37
|
-
(module) =>
|
|
38
|
-
module.file === normalized ||
|
|
39
|
-
normalized.endsWith(`/${module.file}`) ||
|
|
40
|
-
module.file.endsWith(normalized),
|
|
41
|
-
);
|
|
42
|
-
return entry?.effectiveContexts ?? [];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function checkSourceForgeGuards(
|
|
46
|
-
filePath: string,
|
|
47
|
-
source: string,
|
|
48
|
-
importGuards: ImportGuardsArtifact,
|
|
49
|
-
runtimeMatrix: RuntimeMatrix,
|
|
50
|
-
): ForgeGuardSourceViolation[] {
|
|
51
|
-
const effectiveContexts = effectiveContextsForFile(filePath, importGuards);
|
|
52
|
-
if (effectiveContexts.length === 0) {
|
|
53
|
-
return [];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const violations: ForgeGuardSourceViolation[] = [];
|
|
57
|
-
|
|
58
|
-
for (const match of source.matchAll(IMPORT_PATTERN)) {
|
|
59
|
-
const specifier = match[1] ?? match[2];
|
|
60
|
-
if (!specifier) {
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const parsed = parsePackageSpecifier(specifier);
|
|
65
|
-
if (!parsed) {
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const matrixEntry = lookupMatrixEntry(runtimeMatrix, parsed.packageName);
|
|
70
|
-
if (matrixEntry == null) {
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const offset = match.index ?? 0;
|
|
75
|
-
const start = lineColumnAtOffset(source, offset);
|
|
76
|
-
const endColumn = start.column + match[0].length;
|
|
77
|
-
|
|
78
|
-
for (const context of effectiveContexts) {
|
|
79
|
-
if (!matrixEntry.compatible.includes(context)) {
|
|
80
|
-
violations.push({
|
|
81
|
-
packageName: parsed.packageName,
|
|
82
|
-
context,
|
|
83
|
-
rationale:
|
|
84
|
-
matrixEntry.rationale[context] ??
|
|
85
|
-
"package is incompatible with this runtime context",
|
|
86
|
-
line: start.line,
|
|
87
|
-
column: start.column,
|
|
88
|
-
endColumn,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return violations;
|
|
95
|
-
}
|
|
1
|
+
import { lookupMatrixEntry } from "../../../src/forge/compiler/classifier/runtime-matrix.ts";
|
|
2
|
+
import type { ImportGuardsArtifact } from "../../../src/forge/compiler/types/import-guards.ts";
|
|
3
|
+
import type { RuntimeContext } from "../../../src/forge/compiler/types/runtime.ts";
|
|
4
|
+
import type { RuntimeMatrix } from "../../../src/forge/compiler/types/runtime-matrix.ts";
|
|
5
|
+
import { parsePackageSpecifier } from "../../../src/forge/compiler/app-graph/module-graph.ts";
|
|
6
|
+
|
|
7
|
+
export interface ForgeGuardSourceViolation {
|
|
8
|
+
packageName: string;
|
|
9
|
+
context: RuntimeContext;
|
|
10
|
+
rationale: string;
|
|
11
|
+
line: number;
|
|
12
|
+
column: number;
|
|
13
|
+
endColumn: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const IMPORT_PATTERN =
|
|
17
|
+
/(?:import\s+(?:type\s+)?(?:[\w*{}\s,]+from\s+)?|export\s+(?:type\s+)?(?:[\w*{}\s,]+from\s+)?)['"]([^'"]+)['"]|require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
18
|
+
|
|
19
|
+
function lineColumnAtOffset(
|
|
20
|
+
source: string,
|
|
21
|
+
offset: number,
|
|
22
|
+
): { line: number; column: number } {
|
|
23
|
+
const before = source.slice(0, offset);
|
|
24
|
+
const lines = before.split("\n");
|
|
25
|
+
return {
|
|
26
|
+
line: lines.length,
|
|
27
|
+
column: (lines.at(-1)?.length ?? 0) + 1,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function effectiveContextsForFile(
|
|
32
|
+
file: string,
|
|
33
|
+
guards: ImportGuardsArtifact,
|
|
34
|
+
): RuntimeContext[] {
|
|
35
|
+
const normalized = file.replace(/\\/g, "/");
|
|
36
|
+
const entry = guards.moduleContexts.find(
|
|
37
|
+
(module) =>
|
|
38
|
+
module.file === normalized ||
|
|
39
|
+
normalized.endsWith(`/${module.file}`) ||
|
|
40
|
+
module.file.endsWith(normalized),
|
|
41
|
+
);
|
|
42
|
+
return entry?.effectiveContexts ?? [];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function checkSourceForgeGuards(
|
|
46
|
+
filePath: string,
|
|
47
|
+
source: string,
|
|
48
|
+
importGuards: ImportGuardsArtifact,
|
|
49
|
+
runtimeMatrix: RuntimeMatrix,
|
|
50
|
+
): ForgeGuardSourceViolation[] {
|
|
51
|
+
const effectiveContexts = effectiveContextsForFile(filePath, importGuards);
|
|
52
|
+
if (effectiveContexts.length === 0) {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const violations: ForgeGuardSourceViolation[] = [];
|
|
57
|
+
|
|
58
|
+
for (const match of source.matchAll(IMPORT_PATTERN)) {
|
|
59
|
+
const specifier = match[1] ?? match[2];
|
|
60
|
+
if (!specifier) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const parsed = parsePackageSpecifier(specifier);
|
|
65
|
+
if (!parsed) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const matrixEntry = lookupMatrixEntry(runtimeMatrix, parsed.packageName);
|
|
70
|
+
if (matrixEntry == null) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const offset = match.index ?? 0;
|
|
75
|
+
const start = lineColumnAtOffset(source, offset);
|
|
76
|
+
const endColumn = start.column + match[0].length;
|
|
77
|
+
|
|
78
|
+
for (const context of effectiveContexts) {
|
|
79
|
+
if (!matrixEntry.compatible.includes(context)) {
|
|
80
|
+
violations.push({
|
|
81
|
+
packageName: parsed.packageName,
|
|
82
|
+
context,
|
|
83
|
+
rationale:
|
|
84
|
+
matrixEntry.rationale[context] ??
|
|
85
|
+
"package is incompatible with this runtime context",
|
|
86
|
+
line: start.line,
|
|
87
|
+
column: start.column,
|
|
88
|
+
endColumn,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return violations;
|
|
95
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { stripDeterministicHeader } from "../../../src/forge/compiler/primitives/header.ts";
|
|
3
|
-
import type { ImportGuardsArtifact } from "../../../src/forge/compiler/types/import-guards.ts";
|
|
4
|
-
import type { RuntimeMatrix } from "../../../src/forge/compiler/types/runtime-matrix.ts";
|
|
5
|
-
|
|
6
|
-
export interface ForgeGuardArtifacts {
|
|
7
|
-
importGuards: ImportGuardsArtifact;
|
|
8
|
-
runtimeMatrix: RuntimeMatrix;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function parseGeneratedJson<T>(path: string): T {
|
|
12
|
-
const raw = stripDeterministicHeader(readFileSync(path, "utf8"));
|
|
13
|
-
return JSON.parse(raw) as T;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function loadForgeGuardArtifacts(
|
|
17
|
-
importGuardsPath: string,
|
|
18
|
-
runtimeMatrixPath: string,
|
|
19
|
-
): ForgeGuardArtifacts {
|
|
20
|
-
const importGuards = parseGeneratedJson<ImportGuardsArtifact>(importGuardsPath);
|
|
21
|
-
const runtimeMatrix = parseGeneratedJson<RuntimeMatrix>(runtimeMatrixPath);
|
|
22
|
-
|
|
23
|
-
return { importGuards, runtimeMatrix };
|
|
24
|
-
}
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { stripDeterministicHeader } from "../../../src/forge/compiler/primitives/header.ts";
|
|
3
|
+
import type { ImportGuardsArtifact } from "../../../src/forge/compiler/types/import-guards.ts";
|
|
4
|
+
import type { RuntimeMatrix } from "../../../src/forge/compiler/types/runtime-matrix.ts";
|
|
5
|
+
|
|
6
|
+
export interface ForgeGuardArtifacts {
|
|
7
|
+
importGuards: ImportGuardsArtifact;
|
|
8
|
+
runtimeMatrix: RuntimeMatrix;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function parseGeneratedJson<T>(path: string): T {
|
|
12
|
+
const raw = stripDeterministicHeader(readFileSync(path, "utf8"));
|
|
13
|
+
return JSON.parse(raw) as T;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function loadForgeGuardArtifacts(
|
|
17
|
+
importGuardsPath: string,
|
|
18
|
+
runtimeMatrixPath: string,
|
|
19
|
+
): ForgeGuardArtifacts {
|
|
20
|
+
const importGuards = parseGeneratedJson<ImportGuardsArtifact>(importGuardsPath);
|
|
21
|
+
const runtimeMatrix = parseGeneratedJson<RuntimeMatrix>(runtimeMatrixPath);
|
|
22
|
+
|
|
23
|
+
return { importGuards, runtimeMatrix };
|
|
24
|
+
}
|