forgeos 0.1.0-alpha.3 → 0.1.0-alpha.31
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 +10 -0
- package/AGENTS.md +142 -90
- package/CHANGELOG.md +332 -0
- package/LICENSE +21 -0
- package/README.md +86 -13
- package/adapters/go/README.md +23 -0
- package/adapters/go/go.mod +3 -0
- package/adapters/go/http.go +149 -0
- package/adapters/go/registry.go +234 -0
- package/adapters/go/types.go +136 -0
- package/adapters/java/README.md +68 -0
- package/adapters/java/pom.xml +34 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Auth.java +20 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Diagnostic.java +16 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Entry.java +38 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/EntryKind.java +16 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/ErrorInfo.java +4 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Forge.java +94 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeCall.java +12 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeContext.java +11 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHandler.java +8 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHttpHandler.java +179 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeRegistry.java +121 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Json.java +14 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Manifest.java +14 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/RequestEnvelope.java +6 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/ResponseEnvelope.java +25 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Risk.java +18 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Schemas.java +36 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/Service.java +65 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/TransactionMode.java +18 -0
- package/adapters/java/src/main/java/dev/forgeos/adapter/TypedForgeHandler.java +6 -0
- package/adapters/java-spring-boot-starter/README.md +32 -0
- package/adapters/java-spring-boot-starter/pom.xml +36 -0
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeCommand.java +22 -0
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeExternalService.java +15 -0
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeQuery.java +16 -0
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeServiceBeanCondition.java +18 -0
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringAutoConfiguration.java +16 -0
- package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringRuntime.java +104 -0
- package/adapters/java-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +1 -0
- package/bin/forge.mjs +18 -0
- package/docs/cair-protocol.md +103 -0
- package/docs/changelog.md +382 -0
- package/docs/forge-protocol.md +189 -0
- package/examples/go-billing/go.mod +7 -0
- package/examples/go-billing/main.go +120 -0
- package/examples/java-billing/pom.xml +52 -0
- package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/CreateInvoiceInput.java +4 -0
- package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Invoice.java +11 -0
- package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Main.java +127 -0
- package/package.json +34 -4
- package/schemas/forge-manifest.schema.json +57 -0
- package/src/forge/_generated/releaseManifest.json +1 -2
- package/src/forge/_generated/releaseManifest.ts +3 -3
- package/src/forge/agent-adapters/index.ts +1556 -123
- package/src/forge/agent-adapters/types.ts +224 -1
- package/src/forge/agent-memory/bridge.ts +1333 -0
- package/src/forge/agent-memory/context-pack.ts +277 -0
- package/src/forge/agent-memory/hook-runner.ts +312 -0
- package/src/forge/agent-memory/mcp.ts +224 -0
- package/src/forge/agent-memory/normalize.ts +498 -0
- package/src/forge/agent-memory/redaction.ts +103 -0
- package/src/forge/agent-memory/sources/claude-code.ts +51 -0
- package/src/forge/agent-memory/sources/codex-hook-runner.mjs +273 -0
- package/src/forge/agent-memory/sources/codex.ts +119 -0
- package/src/forge/agent-memory/sources/cursor.ts +35 -0
- package/src/forge/agent-memory/types.ts +204 -0
- package/src/forge/bench.ts +248 -0
- package/src/forge/brownfield-import/index.ts +801 -0
- package/src/forge/brownfield-import/types.ts +127 -0
- package/src/forge/cair/action-journal.ts +61 -0
- package/src/forge/cair/action-parser.ts +314 -0
- package/src/forge/cair/action-validator.ts +40 -0
- package/src/forge/cair/actions.ts +1818 -0
- package/src/forge/cair/format.ts +77 -0
- package/src/forge/cair/index.ts +106 -0
- package/src/forge/cair/query.ts +478 -0
- package/src/forge/cair/snapshot.ts +315 -0
- package/src/forge/cair/types.ts +248 -0
- package/src/forge/cli/ai.ts +485 -2
- package/src/forge/cli/auth.ts +150 -5
- package/src/forge/cli/authmd.ts +356 -0
- package/src/forge/cli/baseline.ts +112 -0
- package/src/forge/cli/build.ts +20 -4
- package/src/forge/cli/changed.ts +316 -0
- package/src/forge/cli/codex-app-server.ts +877 -0
- package/src/forge/cli/commands.ts +1403 -15
- package/src/forge/cli/db.ts +208 -2
- package/src/forge/cli/deps.ts +79 -12
- package/src/forge/cli/dev.ts +607 -39
- package/src/forge/cli/docs.ts +265 -0
- package/src/forge/cli/doctor.ts +80 -0
- package/src/forge/cli/handoff.ts +264 -0
- package/src/forge/cli/index.ts +1 -0
- package/src/forge/cli/last-run.ts +84 -0
- package/src/forge/cli/main.ts +59 -3
- package/src/forge/cli/new.ts +13 -1
- package/src/forge/cli/next-actions.ts +23 -0
- package/src/forge/cli/output.ts +302 -1
- package/src/forge/cli/parse.ts +914 -36
- package/src/forge/cli/progress.ts +51 -0
- package/src/forge/cli/query.ts +32 -0
- package/src/forge/cli/release.ts +35 -11
- package/src/forge/cli/rls.ts +568 -17
- package/src/forge/cli/run.ts +41 -0
- package/src/forge/cli/secrets.ts +46 -1
- package/src/forge/cli/security.ts +381 -0
- package/src/forge/cli/self-host.ts +56 -14
- package/src/forge/cli/studio.ts +2217 -0
- package/src/forge/cli/verify.ts +1455 -32
- package/src/forge/cli/windows.ts +22 -0
- package/src/forge/cli/workos.ts +340 -0
- package/src/forge/compiler/agent-contract/build.ts +637 -51
- package/src/forge/compiler/agent-contract/types.ts +47 -2
- package/src/forge/compiler/ai-registry/parse.ts +71 -2
- package/src/forge/compiler/api-surface/build.ts +47 -0
- package/src/forge/compiler/app-graph/build.ts +68 -8
- package/src/forge/compiler/app-graph/extract.ts +107 -0
- package/src/forge/compiler/app-graph/module-graph.ts +73 -78
- package/src/forge/compiler/app-graph/parser.ts +24 -24
- package/src/forge/compiler/app-graph/profile.ts +26 -0
- package/src/forge/compiler/app-graph/versions.ts +1 -1
- package/src/forge/compiler/classifier/capabilities.ts +3 -2
- package/src/forge/compiler/classifier/classify.ts +32 -8
- package/src/forge/compiler/classifier/secrets.ts +3 -2
- package/src/forge/compiler/classifier/signals.ts +91 -1
- package/src/forge/compiler/client-sdk/build-manifest.ts +59 -0
- package/src/forge/compiler/client-sdk/render-client.ts +188 -13
- package/src/forge/compiler/data-graph/parse.ts +3 -3
- package/src/forge/compiler/data-graph/sql/ddl.ts +60 -2
- package/src/forge/compiler/data-graph/sql/serialize.ts +4 -0
- package/src/forge/compiler/data-graph/sql/types.ts +1 -0
- package/src/forge/compiler/diagnostics/codes.ts +39 -0
- package/src/forge/compiler/diagnostics/create.ts +8 -3
- package/src/forge/compiler/diagnostics/index.ts +2 -0
- package/src/forge/compiler/emitter/barrel.ts +3 -0
- package/src/forge/compiler/emitter/render.ts +9 -0
- package/src/forge/compiler/external-manifest/registry.ts +205 -0
- package/src/forge/compiler/external-manifest/types.ts +91 -0
- package/src/forge/compiler/external-manifest/validate.ts +373 -0
- package/src/forge/compiler/frontend-graph/build.ts +142 -14
- package/src/forge/compiler/integration/add.ts +536 -23
- package/src/forge/compiler/integration/plan.ts +17 -11
- package/src/forge/compiler/integration/render.ts +20 -0
- package/src/forge/compiler/integration/snapshot.ts +2 -0
- package/src/forge/compiler/integration/templates/convex.ts +70 -0
- package/src/forge/compiler/integration/templates/index.ts +1 -0
- package/src/forge/compiler/integration/templates/render.ts +34 -0
- package/src/forge/compiler/integration/templates/workos.ts +1063 -0
- package/src/forge/compiler/make-registry/build.ts +6 -7
- package/src/forge/compiler/orchestrator/fast-check.ts +4 -0
- package/src/forge/compiler/orchestrator/manifest.ts +1 -1
- package/src/forge/compiler/orchestrator/plan-profile.ts +23 -0
- package/src/forge/compiler/orchestrator/plan.ts +240 -10
- package/src/forge/compiler/orchestrator/profile.ts +65 -0
- package/src/forge/compiler/orchestrator/run.ts +97 -31
- package/src/forge/compiler/orchestrator/serialize.ts +33 -8
- package/src/forge/compiler/orchestrator/types.ts +1 -1
- package/src/forge/compiler/package-graph/compiler.ts +13 -3
- package/src/forge/compiler/package-manager/adapter.ts +4 -1
- package/src/forge/compiler/package-manager/commands.ts +4 -0
- package/src/forge/compiler/package-manager/executor.ts +30 -1
- package/src/forge/compiler/policy-registry/build.ts +47 -2
- package/src/forge/compiler/policy-registry/parse.ts +32 -2
- package/src/forge/compiler/recipes/definitions.ts +63 -0
- package/src/forge/compiler/recipes/index.ts +2 -0
- package/src/forge/compiler/recipes/registry.ts +6 -0
- package/src/forge/compiler/test-graph/build.ts +11 -3
- package/src/forge/compiler/types/app-graph.ts +8 -2
- package/src/forge/compiler/types/cli.ts +75 -1
- package/src/forge/compiler/types/dev-manifest.ts +4 -0
- package/src/forge/compiler/types/emit.ts +2 -0
- package/src/forge/compiler/types/frontend-graph.ts +2 -2
- package/src/forge/compiler/types/integration.ts +1 -0
- package/src/forge/compiler/types/policy-registry.ts +3 -1
- package/src/forge/delta/classifier.ts +52 -0
- package/src/forge/delta/explain.ts +238 -0
- package/src/forge/delta/git-observer.ts +43 -0
- package/src/forge/delta/ids.ts +44 -0
- package/src/forge/delta/index.ts +25 -0
- package/src/forge/delta/recorder.ts +540 -0
- package/src/forge/delta/redaction.ts +50 -0
- package/src/forge/delta/schema.ts +240 -0
- package/src/forge/delta/session.ts +142 -0
- package/src/forge/delta/status.ts +1126 -0
- package/src/forge/delta/store.ts +3284 -0
- package/src/forge/delta/timeline.ts +178 -0
- package/src/forge/dev/server.ts +777 -17
- package/src/forge/dev/types.ts +15 -1
- package/src/forge/dev/watch.ts +17 -7
- package/src/forge/dev-console/cycle.ts +233 -21
- package/src/forge/dev-console/types.ts +46 -1
- package/src/forge/impact/index.ts +46 -8
- package/src/forge/impact/types.ts +6 -0
- package/src/forge/intent/index.ts +35 -16
- package/src/forge/make/index.ts +34 -5
- package/src/forge/make/templates.ts +155 -2
- package/src/forge/make/types.ts +2 -1
- package/src/forge/policy.ts +1 -1
- package/src/forge/refactor/index.ts +1 -0
- package/src/forge/repair/rules/index.ts +2 -2
- package/src/forge/review/index.ts +158 -12
- package/src/forge/review/types.ts +15 -0
- package/src/forge/runtime/auth/claims.ts +32 -0
- package/src/forge/runtime/auth/config.ts +17 -0
- package/src/forge/runtime/auth/errors.ts +2 -0
- package/src/forge/runtime/auth/evaluate.ts +15 -2
- package/src/forge/runtime/auth/resolve.ts +29 -4
- package/src/forge/runtime/db/factory.ts +1 -3
- package/src/forge/runtime/db/generated-client.ts +13 -2
- package/src/forge/runtime/db/memory-adapter.ts +2 -2
- package/src/forge/runtime/db/pglite-adapter.ts +263 -2
- package/src/forge/runtime/db/postgres-adapter.ts +6 -3
- package/src/forge/runtime/executor.ts +129 -16
- package/src/forge/runtime/external/bridge.ts +649 -0
- package/src/forge/runtime/runner/run-entry.ts +16 -7
- package/src/forge/runtime/telemetry/buffer.ts +4 -1
- package/src/forge/runtime/telemetry/scrubber.ts +91 -10
- package/src/forge/runtime/webhooks/security.ts +189 -0
- package/src/forge/server.ts +23 -2
- package/src/forge/ui/index.ts +45 -0
- package/src/forge/ui/types.ts +1 -0
- package/src/forge/version.ts +1 -1
- package/src/forge/vue/index.ts +407 -0
- package/src/forge/workspace/baseline.ts +112 -0
- package/src/forge/workspace/change-summary.ts +244 -0
- package/src/forge/workspace/forge-cli.ts +14 -0
- package/src/forge/workspace/git-summary.ts +391 -0
- package/templates/agent-workroom/AGENTS.md +29 -0
- package/templates/agent-workroom/README.md +34 -0
- package/templates/agent-workroom/forge.config.ts +3 -0
- package/templates/agent-workroom/package.json +33 -0
- package/templates/agent-workroom/src/actions/indexAgentSignal.ts +10 -0
- package/templates/agent-workroom/src/commands/openWorkroom.ts +61 -0
- package/templates/agent-workroom/src/commands/recordAgentSignal.ts +119 -0
- package/templates/agent-workroom/src/commands/recordCheckRun.ts +52 -0
- package/templates/agent-workroom/src/forge/schema.ts +54 -0
- package/templates/agent-workroom/src/policies.ts +6 -0
- package/templates/agent-workroom/src/queries/listWorkrooms.ts +11 -0
- package/templates/agent-workroom/src/queries/liveWorkroom.ts +63 -0
- package/templates/agent-workroom/tsconfig.json +16 -0
- package/templates/agent-workroom/web/index.html +12 -0
- package/templates/agent-workroom/web/package.json +21 -0
- package/templates/agent-workroom/web/src/App.tsx +345 -0
- package/templates/agent-workroom/web/src/lib/forge.ts +13 -0
- package/templates/agent-workroom/web/src/main.tsx +13 -0
- package/templates/agent-workroom/web/src/styles.css +545 -0
- package/templates/agent-workroom/web/tsconfig.json +27 -0
- package/templates/b2b-support-web/package.json +2 -0
- package/templates/b2b-support-web/tsconfig.json +4 -1
- package/templates/b2b-support-web/web/package.json +1 -1
- package/templates/minimal-web/package.json +2 -1
- package/templates/minimal-web/tsconfig.json +3 -1
- package/templates/minimal-web/web/package.json +2 -2
- package/templates/nuxt-web/.vscode/settings.json +14 -0
- package/templates/nuxt-web/README.md +30 -0
- package/templates/nuxt-web/forge.config.ts +3 -0
- package/templates/nuxt-web/package.json +33 -0
- package/templates/nuxt-web/src/actions/logNoteCreated.ts +11 -0
- package/templates/nuxt-web/src/commands/createNote.ts +26 -0
- package/templates/nuxt-web/src/forge/schema.ts +12 -0
- package/templates/nuxt-web/src/policies.ts +6 -0
- package/templates/nuxt-web/src/queries/listNotes.ts +8 -0
- package/templates/nuxt-web/src/queries/liveNotes.ts +8 -0
- package/templates/nuxt-web/tsconfig.json +17 -0
- package/templates/nuxt-web/web/app.vue +67 -0
- package/templates/nuxt-web/web/components/LiveNotes.vue +89 -0
- package/templates/nuxt-web/web/components/NoteComposer.vue +100 -0
- package/templates/nuxt-web/web/composables/forge.ts +13 -0
- package/templates/nuxt-web/web/composables/useNotes.ts +24 -0
- package/templates/nuxt-web/web/nuxt.config.ts +11 -0
- package/templates/nuxt-web/web/package.json +17 -0
- package/templates/nuxt-web/web/plugins/forge.client.ts +10 -0
- package/templates/nuxt-web/web/plugins/forge.server.ts +10 -0
- package/templates/nuxt-web/web/server/api/forge-health.get.ts +7 -0
- package/templates/nuxt-web/web/tsconfig.json +3 -0
- package/src/forge/_generated/actionSubscriptions.json +0 -2
- package/src/forge/_generated/actionSubscriptions.ts +0 -10
- package/src/forge/_generated/agentAdapterManifest.json +0 -2
- package/src/forge/_generated/agentAdapterManifest.ts +0 -73
- package/src/forge/_generated/agentContract.json +0 -2
- package/src/forge/_generated/agentContract.ts +0 -7829
- package/src/forge/_generated/agentQuickstart.md +0 -34
- package/src/forge/_generated/agentTools.json +0 -2
- package/src/forge/_generated/agentTools.md +0 -16
- package/src/forge/_generated/agentTools.ts +0 -12
- package/src/forge/_generated/aiContext.ts +0 -125
- package/src/forge/_generated/aiModels.json +0 -2
- package/src/forge/_generated/aiModels.ts +0 -51
- package/src/forge/_generated/aiProviders.json +0 -2
- package/src/forge/_generated/aiProviders.ts +0 -23
- package/src/forge/_generated/aiRegistry.json +0 -2
- package/src/forge/_generated/aiRegistry.ts +0 -31
- package/src/forge/_generated/api.json +0 -2
- package/src/forge/_generated/api.ts +0 -8
- package/src/forge/_generated/appGraph.json +0 -2
- package/src/forge/_generated/appGraph.ts +0 -14775
- package/src/forge/_generated/appMap.md +0 -55
- package/src/forge/_generated/artifactManifest.json +0 -2
- package/src/forge/_generated/artifactManifest.ts +0 -7
- package/src/forge/_generated/authClaims.json +0 -2
- package/src/forge/_generated/authClaims.ts +0 -13
- package/src/forge/_generated/authConfig.json +0 -2
- package/src/forge/_generated/authConfig.ts +0 -17
- package/src/forge/_generated/authContext.ts +0 -23
- package/src/forge/_generated/authRegistry.json +0 -2
- package/src/forge/_generated/authRegistry.ts +0 -25
- package/src/forge/_generated/buildInfo.json +0 -2
- package/src/forge/_generated/buildInfo.ts +0 -9
- package/src/forge/_generated/capabilityMap.json +0 -2
- package/src/forge/_generated/capabilityMap.md +0 -15
- package/src/forge/_generated/capabilityMap.ts +0 -17
- package/src/forge/_generated/client.ts +0 -282
- package/src/forge/_generated/clientApi.ts +0 -9
- package/src/forge/_generated/clientManifest.json +0 -2
- package/src/forge/_generated/clientManifest.ts +0 -39
- package/src/forge/_generated/clientTypes.ts +0 -78
- package/src/forge/_generated/configRegistry.json +0 -2
- package/src/forge/_generated/configRegistry.ts +0 -4
- package/src/forge/_generated/dataGraph.json +0 -2
- package/src/forge/_generated/dataGraph.ts +0 -8
- package/src/forge/_generated/db.json +0 -2
- package/src/forge/_generated/db.ts +0 -2
- package/src/forge/_generated/dbSecurityManifest.json +0 -2
- package/src/forge/_generated/dbSecurityManifest.ts +0 -15
- package/src/forge/_generated/dbSessionContext.json +0 -2
- package/src/forge/_generated/dbSessionContext.ts +0 -39
- package/src/forge/_generated/deployManifest.json +0 -2
- package/src/forge/_generated/deployManifest.ts +0 -14
- package/src/forge/_generated/devManifest.json +0 -2
- package/src/forge/_generated/devManifest.ts +0 -62
- package/src/forge/_generated/envSchema.json +0 -2
- package/src/forge/_generated/envSchema.ts +0 -59
- package/src/forge/_generated/frontendGraph.json +0 -2
- package/src/forge/_generated/frontendGraph.ts +0 -27
- package/src/forge/_generated/importGuards.json +0 -2
- package/src/forge/_generated/importGuards.ts +0 -686
- package/src/forge/_generated/index.ts +0 -68
- package/src/forge/_generated/liveProductionManifest.json +0 -2
- package/src/forge/_generated/liveProductionManifest.ts +0 -23
- package/src/forge/_generated/liveProtocol.json +0 -2
- package/src/forge/_generated/liveProtocol.ts +0 -21
- package/src/forge/_generated/liveQueryRegistry.json +0 -2
- package/src/forge/_generated/liveQueryRegistry.ts +0 -9
- package/src/forge/_generated/liveTransportConfig.json +0 -2
- package/src/forge/_generated/liveTransportConfig.ts +0 -19
- package/src/forge/_generated/makeRegistry.json +0 -2
- package/src/forge/_generated/makeRegistry.ts +0 -177
- package/src/forge/_generated/makeTemplates.json +0 -2
- package/src/forge/_generated/makeTemplates.ts +0 -66
- package/src/forge/_generated/mockMap.json +0 -2
- package/src/forge/_generated/mockMap.ts +0 -7
- package/src/forge/_generated/operationPlaybooks.md +0 -167
- package/src/forge/_generated/packageGraph.json +0 -2
- package/src/forge/_generated/packageGraph.ts +0 -249334
- package/src/forge/_generated/packageUpgradeRegistry.json +0 -2
- package/src/forge/_generated/packageUpgradeRegistry.ts +0 -15
- package/src/forge/_generated/permissionMatrix.json +0 -2
- package/src/forge/_generated/permissionMatrix.ts +0 -7
- package/src/forge/_generated/policyRegistry.json +0 -2
- package/src/forge/_generated/policyRegistry.ts +0 -11
- package/src/forge/_generated/queryRegistry.json +0 -2
- package/src/forge/_generated/queryRegistry.ts +0 -9
- package/src/forge/_generated/react.d.ts +0 -22
- package/src/forge/_generated/react.ts +0 -29
- package/src/forge/_generated/reactManifest.json +0 -2
- package/src/forge/_generated/reactManifest.ts +0 -19
- package/src/forge/_generated/rlsPolicies.json +0 -2
- package/src/forge/_generated/rlsPolicies.sql +0 -34
- package/src/forge/_generated/rlsPolicies.ts +0 -6
- package/src/forge/_generated/runtimeGraph.json +0 -2
- package/src/forge/_generated/runtimeGraph.ts +0 -8
- package/src/forge/_generated/runtimeMatrix.json +0 -2
- package/src/forge/_generated/runtimeMatrix.ts +0 -334130
- package/src/forge/_generated/runtimeRegistry.ts +0 -2
- package/src/forge/_generated/runtimeRules.md +0 -91
- package/src/forge/_generated/secretRegistry.json +0 -2
- package/src/forge/_generated/secretRegistry.ts +0 -50
- package/src/forge/_generated/secretsContext.ts +0 -11
- package/src/forge/_generated/serverApi.ts +0 -10
- package/src/forge/_generated/sourceMapManifest.json +0 -2
- package/src/forge/_generated/sourceMapManifest.ts +0 -7
- package/src/forge/_generated/sqlPlan.json +0 -2
- package/src/forge/_generated/sqlPlan.ts +0 -88
- package/src/forge/_generated/subscriptionManifest.json +0 -2
- package/src/forge/_generated/subscriptionManifest.ts +0 -7
- package/src/forge/_generated/symbolicationManifest.json +0 -2
- package/src/forge/_generated/symbolicationManifest.ts +0 -17
- package/src/forge/_generated/telemetryRegistry.json +0 -2
- package/src/forge/_generated/telemetryRegistry.ts +0 -9
- package/src/forge/_generated/telemetrySinks.json +0 -2
- package/src/forge/_generated/telemetrySinks.ts +0 -11
- package/src/forge/_generated/tenantScope.json +0 -2
- package/src/forge/_generated/tenantScope.ts +0 -8
- package/src/forge/_generated/testGraph.json +0 -2
- package/src/forge/_generated/testGraph.ts +0 -3118
- package/src/forge/_generated/testPlanRegistry.json +0 -2
- package/src/forge/_generated/testPlanRegistry.ts +0 -33
- package/src/forge/_generated/uiRoutes.json +0 -2
- package/src/forge/_generated/uiRoutes.ts +0 -16
- package/src/forge/_generated/uiScenarios.json +0 -2
- package/src/forge/_generated/uiScenarios.ts +0 -30
- package/src/forge/_generated/uiTestManifest.json +0 -2
- package/src/forge/_generated/uiTestManifest.ts +0 -27
- package/src/forge/_generated/workflowRegistry.json +0 -2
- package/src/forge/_generated/workflowRegistry.ts +0 -9
- package/src/forge/_generated/workflowSubscriptions.json +0 -2
- package/src/forge/_generated/workflowSubscriptions.ts +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,337 @@
|
|
|
1
1
|
# forgeos
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Smooth the ForgeOS field-demo DX after the alpha.30 app-server and WorkOS exercises.
|
|
8
|
+
|
|
9
|
+
- Add `forge baseline create` and `forge baseline status` so non-git template workspaces can establish a local baseline and get useful `forge changed` / `forge handoff` diffs instead of noisy filesystem inventories.
|
|
10
|
+
- Add `forge auth status` and production-focused `forge auth prove --prod` output so `dev-headers` is clearly labeled as local-only while JWT/OIDC proofs show production auth posture.
|
|
11
|
+
- Expand `forge doctor windows` with local PGlite store posture and cleanup guidance, including safer PGlite abort inspection that does not poison the surrounding process exit code.
|
|
12
|
+
- Add `forge ui audit` and run it during `forge verify --smoke` when a web app is present, catching missing UI scenarios, missing stable Forge test IDs, and missing policy-denied coverage for sensitive routes.
|
|
13
|
+
|
|
14
|
+
## 0.1.0-alpha.30
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Harden the WorkOS/AuthKit adapter and dev telemetry after the alpha.29 field app test.
|
|
19
|
+
|
|
20
|
+
- Normalize WorkOS AuthKit `User` objects before generated auth routes pass them to Forge session and organization-resolution helpers, so apps typecheck against the WorkOS SDK without unsafe direct `Record<string, unknown>` casts.
|
|
21
|
+
- Keep telemetry best-effort when a database adapter applies `INSERT ... RETURNING` but omits returned rows, preventing telemetry from surfacing as `FORGE_DEV_SERVER_ERROR`.
|
|
22
|
+
- Add regression coverage for generated WorkOS adapter typechecking and telemetry inserts that return no rows.
|
|
23
|
+
|
|
24
|
+
## 0.1.0-alpha.29
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Add the first WorkOS/AuthKit adapter and local auth metadata tooling.
|
|
29
|
+
|
|
30
|
+
- Add `forge add auth workos`, generated WorkOS seed/config/docs, AuthKit routes, webhook handling, JWT/OIDC claim mapping, and permission-derived Forge policies.
|
|
31
|
+
- Add `forge authmd generate` and `forge authmd check`, including `/auth.md` and OAuth protected-resource metadata served by `forge dev`.
|
|
32
|
+
- Add a local WorkOS/FGA testkit, resource-graph helpers, cross-tenant guards, FGA cache/fallback telemetry, and mock multi-tenant regression coverage.
|
|
33
|
+
- Teach Forge auth and policies to understand permission claims alongside roles.
|
|
34
|
+
- Add `forge version --json` as a command alias and capture local helper table reads in the generated agent contract/capability map.
|
|
35
|
+
|
|
36
|
+
## 0.1.0-alpha.28
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Accept visible Codex hook canaries as sufficient for local editing while reporting native Codex provenance separately through `nativeTrustStatus`.
|
|
41
|
+
|
|
42
|
+
## 0.1.0-alpha.27
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Stabilize `forge add convex` and generated integration artifacts.
|
|
47
|
+
|
|
48
|
+
- Re-emit integration adapters, docs, and testkits from the main generator so `forge generate --check` and `forge verify --smoke` stay clean after `forge add`.
|
|
49
|
+
- Keep partial `forge add` plans from deleting unrelated generated files before the full generator can reconcile the workspace.
|
|
50
|
+
- Include changed package-manager files such as `package.json` and lockfiles in `forge add --json` handoffs.
|
|
51
|
+
- Replace stale fast-check manifest hashes instead of merging them, and invalidate old manifest schemas to avoid phantom generated drift.
|
|
52
|
+
- Skip Bun module mock registration when the active Bun runtime does not expose `Bun.mock.module`, while still applying mock secret env vars.
|
|
53
|
+
- Filter generated and operational filesystem noise from `forge changed --authored` in non-git workspaces.
|
|
54
|
+
- Keep Java build outputs such as `target/`, `.class`, and `.jar` files out of the published npm tarball.
|
|
55
|
+
|
|
56
|
+
## 0.1.0-alpha.26
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Harden the field-demo loop after the Team Onboarding app exercise.
|
|
61
|
+
|
|
62
|
+
- Let `forge changed` and `forge handoff` summarize non-git workspaces with a filesystem inventory instead of reporting zero useful changes.
|
|
63
|
+
- Keep `forge make resource` global by default unless a tenants table exists or `--tenant-scoped` is explicit.
|
|
64
|
+
- Expand capability-map table detection for aliased `ctx.db` usage.
|
|
65
|
+
- Wait through short-lived DeltaDB writer locks before reporting `FORGE_DELTA_BUSY`.
|
|
66
|
+
|
|
67
|
+
## Unreleased
|
|
68
|
+
|
|
69
|
+
## 0.1.0-alpha.25
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- Harden DeltaDB and Agent Memory under real `forge dev` concurrency.
|
|
74
|
+
|
|
75
|
+
- Stop long-running dev recorders from holding the DeltaDB writer lock between events.
|
|
76
|
+
- Retry short transient DeltaDB writer conflicts before reporting `FORGE_DELTA_BUSY`.
|
|
77
|
+
- Keep Codex hook queue checkpoints unchanged when Agent Memory ingest is blocked by a busy DeltaDB writer, then retry safely instead of losing queued events.
|
|
78
|
+
- Add watcher backoff metadata for lock recovery and document the safe queue/DeltaDB behavior.
|
|
79
|
+
|
|
80
|
+
- Fix tenant-scope reporting in the generated agent contract and capability map.
|
|
81
|
+
|
|
82
|
+
- Match tenant-scoped tables by both authored/camelCase table names and generated SQL snake_case table names.
|
|
83
|
+
- Report camelCase liveQuery dependencies such as `onboardingTasks` as `tenant` scoped when `tenantScope.json` confirms `tenant_id`.
|
|
84
|
+
- Add regression coverage for the Team Onboarding style liveQuery/capability-map path.
|
|
85
|
+
|
|
86
|
+
## 0.1.0-alpha.24
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- Consolidate the public alpha adoption surface and agent-contract positioning.
|
|
91
|
+
|
|
92
|
+
- Add an explicit MIT `LICENSE`, package license metadata, and a private GitHub Security Advisory disclosure path.
|
|
93
|
+
- Add stable-alpha, AI-coding, agent demo, Convex, and agent-eval documentation pages, plus a runner-agnostic eval task scaffold.
|
|
94
|
+
- Fix `forge new --json` so scaffold automation receives structured JSON instead of human next-step text.
|
|
95
|
+
- Add the first `forge add convex` app-contract recipe with runtime placement guardrails, optional Convex environment names, generated docs, and a mock testkit.
|
|
96
|
+
- Expand field-report expectations and package/release tests for license, security disclosure, docs, create-app help, Convex recipes, and JSON scaffold output.
|
|
97
|
+
|
|
98
|
+
## 0.1.0-alpha.23
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- Tighten the post-alpha.22 release surface and package evidence.
|
|
103
|
+
|
|
104
|
+
- Add a dedicated Nuxt template smoke workflow that installs `nuxt-web`, runs Forge generation/checks, runs Nuxt typecheck, and probes `forge dev --once`.
|
|
105
|
+
- Include `nuxt-web` in the default field-test template matrix.
|
|
106
|
+
- Add explicit `scopeTarget` metadata and human-readable target output for `forge agent context --change`, `--proof`, and `--handoff`.
|
|
107
|
+
- Teach `forge explain` to fall back to the current generated agent contract when DeltaDB has no runtime history, while marking the result as contract-defined instead of executed.
|
|
108
|
+
- Downgrade read-only observation commands such as `forge status`, `forge changed`, `forge handoff`, `forge explain`, `forge timeline`, and CAIR queries to low-confidence context-gathering sessions in DeltaDB.
|
|
109
|
+
- Package `docs/cair-protocol.md` in the npm tarball and expand the public security/threat-model docs for DeltaDB, agent memory, CAIR, Studio bridge, brownfield import, and Nuxt surfaces.
|
|
110
|
+
|
|
111
|
+
## 0.1.0-alpha.22
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- Improve the post-alpha.21 agent workflow without adding new MCP tools.
|
|
116
|
+
|
|
117
|
+
- Add `forge agent context` scopes for entry, change, proof, and handoff context packs.
|
|
118
|
+
- Add DeltaDB verbose health details for queue redaction, operation age, semantic projection state, and overhead posture.
|
|
119
|
+
- Add `forge delta compact`, `forge delta prune`, and redacted `forge delta export` for local Delta maintenance and support bundles.
|
|
120
|
+
- Add `forge doctor delta` for recorder writability, queue drain, redaction, and gitignore checks.
|
|
121
|
+
- Add Semantic Timeline summary data for stale proofs and causal chains.
|
|
122
|
+
- Record CAIR snapshot/query/action activity as Delta timeline events without adding new MCP tools.
|
|
123
|
+
- Add a Studio snapshot handoff block and a dedicated CAIR Protocol documentation page.
|
|
124
|
+
- Add an official `nuxt-web` template with a Forge notes backend, client/server Nuxt plugins, a `useNotes` composable, a Nitro runtime-config route, and generated Vue composables.
|
|
125
|
+
|
|
126
|
+
## 0.1.0-alpha.21
|
|
127
|
+
|
|
128
|
+
### Patch Changes
|
|
129
|
+
|
|
130
|
+
- Harden Codex hook queue privacy and brownfield import classification.
|
|
131
|
+
|
|
132
|
+
- Queue new Codex hook events as redacted payloads instead of storing raw prompts, tool inputs, tool responses, or transcripts in `.forge/agent/events.ndjson`.
|
|
133
|
+
- Compact consumed hook queue history into redacted `.history` lines so old raw queue entries are not copied forward during drain retention.
|
|
134
|
+
- Scope brownfield route classification to the detected route handler, so read-only GET handlers are not marked command-like because a sibling route in the same file writes state.
|
|
135
|
+
- Mark read-shaped `POST /search`, `/query`, `/filter`, `/lookup`, and `/graphql` routes as `command-candidate` with `ambiguous-post-query` risk instead of treating them as normal writes.
|
|
136
|
+
- Sync the public docs changelog/CLI reference and clarify the alpha/latest npm dist-tag policy.
|
|
137
|
+
|
|
138
|
+
## 0.1.0-alpha.20
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- Fix generated-change diagnostics, Codex hook queue handling, and external stdio command parsing.
|
|
143
|
+
|
|
144
|
+
- Classify generated `AGENTS.md` blocks and `.forge/agent/context.json` as derived artifacts in `forge changed`/`forge status`.
|
|
145
|
+
- Skip probe, invalid, and out-of-workspace queued hook events during Agent Memory drain, and bound queue inspection for large hook queues.
|
|
146
|
+
- Preserve empty stdio command arguments, diagnose malformed command strings, and support structured `service.commandArgs` in external manifests.
|
|
147
|
+
- Include the basic example client demo in typecheck coverage.
|
|
148
|
+
|
|
149
|
+
## 0.1.0-alpha.19
|
|
150
|
+
|
|
151
|
+
Alpha hardening:
|
|
152
|
+
|
|
153
|
+
- Added the `agent-workroom` app template for Forge Studio style demos: external
|
|
154
|
+
agents edit the app, while ForgeOS shows preview URL, agent signals, check
|
|
155
|
+
runs, and handoff evidence through generated commands and liveQuery bindings.
|
|
156
|
+
- Added `forge studio attach` for Studio-style observer apps: writes `.forge/studio/attachment.json`, prepares external-agent adapters/hooks, and returns the target preview URL.
|
|
157
|
+
- Added `summary.preview` and `summary.urls.suggestedPreview` to `forge dev --once --json` so observer UIs can target the app under construction instead of pointing at themselves.
|
|
158
|
+
- Improved `forge dev` port-busy failures with a `port_busy` JSON failure kind and suggested recovery commands, including the common "Is port X in use?" startup error shape.
|
|
159
|
+
- `forge dev` now resolves the web app port before startup and automatically moves to the next available port when the default web port is busy, keeping the printed/JSON web URL truthful.
|
|
160
|
+
- Improved `forge check --json` next actions by surfacing diagnostic-specific repair/inspect commands instead of a generic last-test-run repair hint.
|
|
161
|
+
- Added `forge doctor agent --target <agent>` as the top-level agent readiness check.
|
|
162
|
+
- Added explicit `forge agent ingest <source> --watch --file <events.ndjson>` support for opt-in hook/export file ingestion.
|
|
163
|
+
- Added human-friendly verifier aliases: `forge verify quick`, `forge verify agent`, and `forge verify release`.
|
|
164
|
+
- Made `forge status --human` an explicit accepted spelling and documented `forge add <npm-package> --workspace web` as the normal package-add path.
|
|
165
|
+
- Made bare `forge inspect` default to the compact `summary` target instead of returning a usage error.
|
|
166
|
+
- Added `forge release doctor`, `release check --allow-missing-local-release`, and `self-host check --prepared-only` so release readiness can distinguish hard failures from not-yet-prepared local artifacts.
|
|
167
|
+
- Hardened the public packed-package smoke with dry-run mode, per-step JSON evidence, step timeouts, installed-global CLI coverage, hook smoke readiness, Studio open coverage, and preview-port cleanup checks.
|
|
168
|
+
- Expanded `forge docs check` with YAML shape checks, internal Markdown link validation, optional ReadTheDocs-style venv installation, and strict MkDocs build execution.
|
|
169
|
+
- Added authored-only review paths through `forge changed --authored` and `forge diff authored`, keeping generated artifacts collapsed unless explicitly requested.
|
|
170
|
+
- Added `forge delta status --verbose --json` for schema, lock, path, and aggregate-count diagnostics without expanding the default status payload.
|
|
171
|
+
- Added explicit hook readiness levels (`none`, `canary`, `trusted-native`) and documented `.codex/hooks.json` as versioned adapter configuration while keeping `.forge/agent/**` as local operational state.
|
|
172
|
+
|
|
173
|
+
## 0.1.0-alpha.18
|
|
174
|
+
|
|
175
|
+
Codex hook memory hardening:
|
|
176
|
+
|
|
177
|
+
- Hardened Codex hook ingestion by deriving useful tool-call metadata from the documented hook wire format while keeping raw prompts, tool inputs, tool responses, transcripts, and secrets out of Agent Memory.
|
|
178
|
+
- Added safe command summaries, tool-call ids, result status, exit codes, response summaries, inferred files, and inferred runtime entries for Codex `PreToolUse`, `PermissionRequest`, and `PostToolUse` events.
|
|
179
|
+
- Updated the Codex hook installer with hook timeouts and status messages, and added a local wrapper so repo hooks can use the checkout implementation.
|
|
180
|
+
- Documented the safe Codex hook metadata surface and added regression coverage for real hook payload shapes.
|
|
181
|
+
|
|
182
|
+
## 0.1.0-alpha.17
|
|
183
|
+
|
|
184
|
+
External runtime timeline metadata:
|
|
185
|
+
|
|
186
|
+
- Enriched DeltaDB runtime call recording for imported Go/Java/external services by reading generated `externalServices.json` metadata during `forge run` and `forge query`.
|
|
187
|
+
- `forge timeline` and `forge explain` now report external runtime `service`, `language`, `risk`, `policy`, `tenantScoped`, and `needsApproval` state instead of falling back to null/false values after successful external calls.
|
|
188
|
+
- Added a DeltaDB schema migration for `runtime_calls.needs_approval` and bumped the local DeltaDB schema to `0.3.1`.
|
|
189
|
+
- Added regression coverage for the real CLI recorder path so manifest-imported external commands keep semantic metadata in timelines.
|
|
190
|
+
- Promotes this release on npm as both `alpha` and `latest`.
|
|
191
|
+
|
|
192
|
+
## 0.1.0-alpha.16
|
|
193
|
+
|
|
194
|
+
Stability alignment:
|
|
195
|
+
|
|
196
|
+
- Fixed H47 `forge timeline` and `forge explain` crashes after large `artifact.generated` payloads by replacing unsafe JSON string truncation with a safe summary/hash envelope.
|
|
197
|
+
- Summarized generated artifact batches in the Semantic Timeline with count, hash, sample, and omitted count instead of embedding every artifact in timeline event data.
|
|
198
|
+
- Fixed H49 brownfield import detection for root-level Next.js App Router and Pages API routes such as `app/api/.../route.ts` and `pages/api/...`.
|
|
199
|
+
- Updated public CLI and DeltaDB docs for timeline/session/explain/MCP/agent-memory commands and clarified that `.forge/delta/delta.db` is a PGlite/Postgres data directory.
|
|
200
|
+
- Verified the release against a public GitHub `main` smoke app using `generate`, `check`, `delta status`, `timeline`, `explain`, `import analyze`, and `inspect imported`.
|
|
201
|
+
|
|
202
|
+
## 0.1.0-alpha.15
|
|
203
|
+
|
|
204
|
+
Brownfield import analysis:
|
|
205
|
+
|
|
206
|
+
- Added H49 `forge import analyze` and `forge import inspect` for static brownfield TypeScript/JavaScript app inventory.
|
|
207
|
+
- Detects Next.js App Router routes, Pages API routes, Express/Nest-style handlers, frontend `fetch`/`axios` calls, env usage, framework/data/external package signals, and conservative candidate command/query entries.
|
|
208
|
+
- Writes `.forge/import` artifacts including inventory, routes, frontend calls, candidate entries, risk report, migration plan, and imported agent contract.
|
|
209
|
+
- Keeps imported entries hidden from agents by default with `origin: imported`, `assurance: static-scan`, `reviewStatus: needs-review`, `visibleToAgent: false`, and approval required for command-like or risky entries.
|
|
210
|
+
- Added `forge inspect imported --json` plus focused H49 CLI and scanner coverage.
|
|
211
|
+
|
|
212
|
+
## 0.1.0-alpha.14
|
|
213
|
+
|
|
214
|
+
Java and Nuxt/Vue support:
|
|
215
|
+
|
|
216
|
+
- Added the Java external runtime adapter with a lightweight JDK HTTP bridge, manifest export, typed handlers, tenant/auth context, diagnostics, and command/query registration.
|
|
217
|
+
- Added a Spring Boot starter for Java services that want annotation-based Forge command/query exposure.
|
|
218
|
+
- Added the `java-billing` conformance example and packaged it with the public alpha line.
|
|
219
|
+
- Added generated Vue bindings and a `forgeos/vue` export with `provideForge`, `ForgeVuePlugin`, `useForgeQuery`, `useForgeCommand`, and `useForgeLiveQuery`.
|
|
220
|
+
- Added Nuxt UI scaffolding through `forge make ui --framework nuxt`, including plugin wiring, composable bridge files, and frontend graph detection for `.vue` routes/components.
|
|
221
|
+
- Updated docs, agent adapter guidance, generated manifests, and focused Java/Vue/Nuxt tests.
|
|
222
|
+
- Kept H44-H48 memory, sessions, timeline, grouping, and MCP surfaces intact while merging the Java/Nuxt work into `main`.
|
|
223
|
+
|
|
224
|
+
## 0.1.0-alpha.13
|
|
225
|
+
|
|
226
|
+
Agent Memory Bridge:
|
|
227
|
+
|
|
228
|
+
- Added the H48 Agent Memory Bridge alpha with redacted external agent event ingestion and normalized `forge.agent-event.v1` envelopes.
|
|
229
|
+
- Added Codex and Claude Code hook installers plus Cursor MCP/rules setup, all with raw prompts, completions, tool args, transcripts, and cloud sync off by default.
|
|
230
|
+
- Added `forge mcp serve` with context, memory, timeline, and inspect tools for external agents.
|
|
231
|
+
- Added `forge agent install`, `forge agent ingest`, `forge agent context`, and `forge agent memory` commands.
|
|
232
|
+
- Persisted external agent activity in DeltaDB and linked agent/tool/file events into the semantic timeline.
|
|
233
|
+
- Added focused privacy, ingest, MCP, installer, and CLI parse coverage for the H48 bridge.
|
|
234
|
+
|
|
235
|
+
## 0.1.0-alpha.12
|
|
236
|
+
|
|
237
|
+
Semantic Timeline:
|
|
238
|
+
|
|
239
|
+
- Added the H47 Semantic Timeline projection for DeltaDB with rebuildable timeline events, entity indexes, causal edges, and projection state.
|
|
240
|
+
- Upgraded `forge timeline` from a raw operation log view into an entity-oriented semantic timeline for runtime entries, policies, diagnostics, proofs, services, files, and sessions.
|
|
241
|
+
- Added proof staleness detection and causal links for denial -> policy repair -> successful execution flows.
|
|
242
|
+
- Updated `forge explain` to include semantic timeline context and current-state summaries when available.
|
|
243
|
+
- Documented the timeline projection/rebuild model and added focused DeltaDB coverage for runtime, policy, diagnostic, proof, and deterministic rebuild scenarios.
|
|
244
|
+
|
|
245
|
+
## 0.1.0-alpha.11
|
|
246
|
+
|
|
247
|
+
Strict verify performance:
|
|
248
|
+
|
|
249
|
+
- Reduced the validated `forge verify --strict` wall time from roughly 358-454s to about 116s on the current Windows test machine.
|
|
250
|
+
- Added stable repo-local `tsx` CLI caching under `node_modules/.cache/forge-tsx-cli` so spawned CLI tests reuse the warm compiler path.
|
|
251
|
+
- Balanced TestGraph strict execution across shared and isolated lanes, bringing the slowest files down from roughly 50s to under 10s in the updated profile.
|
|
252
|
+
- Moved heavy refactor/impact/external runtime suites onto faster shared paths where safe and kept isolation for process-sensitive tests.
|
|
253
|
+
- Documented and guarded the cache behavior so future test helpers preserve the speedup without checking cache contents into git.
|
|
254
|
+
- Added guarded alpha release workflow support for promoting the public `latest` dist-tag when npm token auth is configured.
|
|
255
|
+
|
|
256
|
+
## 0.1.0-alpha.10
|
|
257
|
+
|
|
258
|
+
Launch polish:
|
|
259
|
+
|
|
260
|
+
- Fixed `forge run <external-command> --args ...` so CLI arguments reach the external runtime bridge.
|
|
261
|
+
- Added direct external query CLI support through `forge query <service.query> --args ...`.
|
|
262
|
+
- Emit generated `.json` artifacts as pure JSON while keeping deterministic headers on code/text artifacts.
|
|
263
|
+
- Relaxed the `minimal-web` template verify script to `forge verify --smoke` and added the missing `check` script to `b2b-support-web`.
|
|
264
|
+
- Updated public protocol/changelog docs for the external runtime and Go adapter alpha line.
|
|
265
|
+
- Bumped the create-app wrapper package line to `create-forgeos-app@0.1.0-alpha.4`.
|
|
266
|
+
|
|
267
|
+
## 0.1.0-alpha.9
|
|
268
|
+
|
|
269
|
+
### Patch Changes
|
|
270
|
+
|
|
271
|
+
- Added the Forge external runtime protocol bridge for manifest-backed commands and queries.
|
|
272
|
+
- Added the Go adapter MVP with a real `go-billing` conformance example.
|
|
273
|
+
- Emitted external service metadata into inspect/API/agent artifacts, including `needsApproval` for agent tools.
|
|
274
|
+
- Reuse compiler classifier package signals across export classification, dropping repeated package signal scans.
|
|
275
|
+
- Reuse serialized graph JSON when rendering the largest generated TypeScript graph artifacts.
|
|
276
|
+
- Keep generated Forge artifacts aligned with the `0.1.0-alpha.9` compiler/runtime version.
|
|
277
|
+
|
|
278
|
+
## 0.1.0-alpha.8
|
|
279
|
+
|
|
280
|
+
### Patch Changes
|
|
281
|
+
|
|
282
|
+
- [`7568756`](https://github.com/Stahldavid/forge/commit/756875688873dd60d3d6cf700a7bb7c211968c69) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Publish prerelease packages through the ForgeOS alpha publisher so npm dist-tags stay aligned.
|
|
283
|
+
|
|
284
|
+
## 0.1.0-alpha.7
|
|
285
|
+
|
|
286
|
+
### Patch Changes
|
|
287
|
+
|
|
288
|
+
- [`4ace311`](https://github.com/Stahldavid/forge/commit/4ace3113e3298b5c306000870922fcfbae9c1861) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Keep npm prerelease publishing on the public alpha dist-tag.
|
|
289
|
+
|
|
290
|
+
## 0.1.0-alpha.6
|
|
291
|
+
|
|
292
|
+
### Patch Changes
|
|
293
|
+
|
|
294
|
+
- [`c30f906`](https://github.com/Stahldavid/forge/commit/c30f9069c99ac747ce143ab5fbcbf13912ed8760) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Add CLI version output, align create-app help with package metadata, and add release dependency audit evidence.
|
|
295
|
+
|
|
296
|
+
## 0.1.0-alpha.5
|
|
297
|
+
|
|
298
|
+
Release alignment for the public alpha channel:
|
|
299
|
+
|
|
300
|
+
- Added `forge ai redteam --model-level --json` with deterministic prompt-injection, secret-exfiltration, approval-bypass, cross-tenant, and indirect tool-injection probes.
|
|
301
|
+
- Added `forge security prove --full --json` support for source checkouts, with graceful structural-proof fallback when packaged apps do not include ForgeOS test fixtures.
|
|
302
|
+
- Strengthened npm publish workflows to run `security prove --db postgres --full --json`.
|
|
303
|
+
- Added public registry smoke coverage for `forgeos@alpha` and `create-forgeos-app@alpha`.
|
|
304
|
+
- Bumped the create-app wrapper package line to `create-forgeos-app@0.1.0-alpha.1`.
|
|
305
|
+
|
|
306
|
+
## 0.1.0-alpha.4
|
|
307
|
+
|
|
308
|
+
Security assurance and release evidence hardening:
|
|
309
|
+
|
|
310
|
+
- Added value-aware telemetry redaction for known secret values in safe-looking fields, messages, details, outputs, and stack traces.
|
|
311
|
+
- Added webhook signature, timestamp, and replay protection helpers with Stripe/GitHub/generic HMAC coverage.
|
|
312
|
+
- Added HTTP tenant-isolation tests that exercise the dev server/API boundary, not only the internal runtime executor.
|
|
313
|
+
- Added `forge rls mutate-test --json` to kill dangerous generated RLS mutations such as missing FORCE RLS, missing policies, unconditional predicates, and `BYPASSRLS`.
|
|
314
|
+
- Extended `forge security prove --json` with RLS mutation proof and invariant-level evidence metadata.
|
|
315
|
+
- Added scripts to split security evidence by invariant and emit basic release supply-chain evidence plus CycloneDX SBOM.
|
|
316
|
+
- Strengthened publish/security workflows so release gates use Postgres-backed security proof, RLS mutation proof, release evidence, and SBOM generation.
|
|
317
|
+
|
|
318
|
+
## 0.1.0-alpha.3
|
|
319
|
+
|
|
320
|
+
Native Forge AI agents on top of Vercel AI SDK v6:
|
|
321
|
+
|
|
322
|
+
- Added `aiTool` and `agent` primitives with generated `agentTools.json` / `agentTools.md`.
|
|
323
|
+
- Added `ctx.agent.run` and `ctx.ai.runAgent` using AI SDK `ToolLoopAgent`.
|
|
324
|
+
- Added auto-tools for commands, queries, and liveQueries with read-only vs approval-required writes.
|
|
325
|
+
- Added dev agent endpoints: `POST /ai/agents/run` and `POST /ai/agents/chat`.
|
|
326
|
+
- Extended `forge ai` CLI with `tools`, `agents`, and `trace` subcommands.
|
|
327
|
+
- Added `forge inspect agent-tools` and agent tool metadata in `agentContract.json`.
|
|
328
|
+
- Upgraded runtime dependency to AI SDK v6 for tool calling, streaming UI, and MCP compatibility.
|
|
329
|
+
|
|
330
|
+
Documentation:
|
|
331
|
+
|
|
332
|
+
- Added public [AI](https://forgeos.readthedocs.io/en/latest/ai/) page and AST-aware `rename command` codemod docs.
|
|
333
|
+
- Expanded ReadTheDocs to full agent-native coverage: agent workflow (`forge do`), frontend/liveQuery, security/data, authoring, testing/repair, self-host, templates, Material theme, and changelog page.
|
|
334
|
+
|
|
3
335
|
## 0.1.0-alpha.2
|
|
4
336
|
|
|
5
337
|
Windows and generated-app hardening:
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ForgeOS contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# ForgeOS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The contract layer for agentic software development. 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/public alpha MVP, implemented through
|
|
5
|
+
**Status:** private/public alpha MVP, implemented through H49. ForgeOS already includes the compiler, local runtime, frontend SDK, production auth, RLS compiler, liveQuery, self-host artifacts, generated agent contract, guided dev loop, repair/review/test tooling, AST-aware codemods, package intelligence, native AI tools/agents, DeltaDB work memory, external agent memory ingestion, brownfield import analysis, npm alpha publishing, and Read the Docs public docs. Public release hardening is still focused on deeper semantic codemods, broader field reports, and more production mileage.
|
|
6
6
|
|
|
7
|
-
Public docs
|
|
7
|
+
Public docs live at [forgeos.readthedocs.io](https://forgeos.readthedocs.io/). The repo builds them with `.readthedocs.yaml`, `mkdocs.yml`, and `docs/index.md`.
|
|
8
|
+
|
|
9
|
+
Start with [Why ForgeOS](https://forgeos.readthedocs.io/en/latest/why-forgeos/) to understand the agent-native design.
|
|
10
|
+
|
|
11
|
+
For the short version, read [The Five-Minute ForgeOS Model](https://forgeos.readthedocs.io/en/latest/five-minute-model/), [Alpha Golden Path](https://forgeos.readthedocs.io/en/latest/golden-path/), and [Stable Alpha Surface](https://forgeos.readthedocs.io/en/latest/stable-alpha/). The important distinction is that external coding agents are the primary ForgeOS workflow; integrated AI SDK features are available for apps that need in-product AI, but they are not the main development loop.
|
|
8
12
|
|
|
9
13
|
## Agent-First Quickstart
|
|
10
14
|
|
|
@@ -47,7 +51,7 @@ These files describe the app surface, runtime rules, generated files, policies,
|
|
|
47
51
|
Public one-command app creation:
|
|
48
52
|
|
|
49
53
|
```bash
|
|
50
|
-
npm create
|
|
54
|
+
npm create forgeos-app@alpha notes-app -- --template minimal-web
|
|
51
55
|
cd notes-app
|
|
52
56
|
npm run dev
|
|
53
57
|
```
|
|
@@ -89,6 +93,39 @@ npm run field:test -- --package-managers npm --templates minimal-web --forge-spe
|
|
|
89
93
|
|
|
90
94
|
The scheduled/manual `Field Tests` workflow expands that coverage across Linux, macOS, Windows, Node 22, Node 24, and npm/pnpm/yarn/bun.
|
|
91
95
|
|
|
96
|
+
## External Runtimes And Adapters
|
|
97
|
+
|
|
98
|
+
ForgeOS can import services written outside TypeScript through the Forge Protocol.
|
|
99
|
+
External runtimes publish a `forge.manifest.json` that describes commands, queries,
|
|
100
|
+
transport, policies, risk metadata, tenant scope, and schemas. Forge then emits
|
|
101
|
+
the same machine-readable app/API/agent artifacts and exposes runtime bridge
|
|
102
|
+
endpoints for those entries.
|
|
103
|
+
|
|
104
|
+
The Go example starts a manifest-backed service:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd examples/go-billing
|
|
108
|
+
go run . --manifest --base-url http://127.0.0.1:8787 > forge.manifest.json
|
|
109
|
+
go run . --addr 127.0.0.1:8787 --base-url http://127.0.0.1:8787
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
In a Forge app:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
forge manifest validate ./forge.manifest.json --json
|
|
116
|
+
forge manifest import ./forge.manifest.json --json
|
|
117
|
+
forge generate
|
|
118
|
+
forge run billing.createInvoice --args '{"title":"Invoice"}' --user-id u1 --tenant-id tenant-a --role admin
|
|
119
|
+
forge query billing.listInvoices --args '{}' --user-id u1 --tenant-id tenant-a --role admin
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
For Java, see [`adapters/java`](adapters/java/README.md),
|
|
123
|
+
[`adapters/java-spring-boot-starter`](adapters/java-spring-boot-starter/README.md),
|
|
124
|
+
and [`examples/java-billing`](examples/java-billing/README.md).
|
|
125
|
+
|
|
126
|
+
See [`docs/forge-protocol.md`](docs/forge-protocol.md), [`schemas/forge-manifest.schema.json`](schemas/forge-manifest.schema.json),
|
|
127
|
+
and [`adapters/go`](adapters/go/README.md).
|
|
128
|
+
|
|
92
129
|
## What ForgeOS Generates
|
|
93
130
|
|
|
94
131
|
```txt
|
|
@@ -138,14 +175,17 @@ forge.lock
|
|
|
138
175
|
| Auth | dev headers, JWT, OIDC discovery/JWKS verification via `jose`, production-mode guardrails |
|
|
139
176
|
| RLS | Postgres RLS SQL compiler/checks for DB-enforced tenant isolation |
|
|
140
177
|
| Secrets/env | secret registry, env schema, redaction, strict `process.env` checks |
|
|
141
|
-
| AI | Vercel AI SDK v6 engine, provider registry, `ctx.ai`, `ctx.agent.run`, `aiTool`, `agent`, `/ai/agents/run` JSON automation, `/ai/agents/chat` UIMessage streaming, `forge ai trace`, mock mode, telemetry without prompt/output retention by default |
|
|
178
|
+
| AI | Vercel AI SDK v6 engine, provider registry, `ctx.ai`, `ctx.agent.run`, `aiTool`, `agent`, `/ai/agents/run` JSON automation, `/ai/agents/chat` UIMessage streaming, `forge ai trace`, structural and model-level redteam probes, mock mode, telemetry without prompt/output retention by default |
|
|
142
179
|
| Frontend | generated client SDK, React/Next hooks, template app, liveQuery client support |
|
|
143
180
|
| LiveQuery | durable invalidation log, reconnect/resume semantics, production hardening checks |
|
|
181
|
+
| DeltaDB | ambient local recorder plus inferred work sessions and semantic timelines for Forge commands, dev file saves, generated artifacts, runtime calls, policies, proofs, diagnostics, `forge timeline`, `forge explain`, and optional `forge session` correction |
|
|
182
|
+
| Agent memory | opt-in Codex and Claude Code hooks, Cursor MCP/rules setup, normalized external agent events, redacted local memory, and `forge mcp serve` |
|
|
183
|
+
| Brownfield import | static TypeScript/JavaScript app inventory with routes, frontend calls, env usage, candidate entries, risk report, migration plan, and hidden-by-default imported agent contract |
|
|
144
184
|
| Self-host | compose/deploy artifacts and self-host checks |
|
|
145
185
|
| Agent contract | `AGENTS.md`, `agentContract.json`, app maps, runtime rules, playbooks, inspect/doctor |
|
|
146
186
|
| Authoring | `forge make`, feature blueprints, safe refactor plans, package upgrade plans |
|
|
147
187
|
| Testing/repair | impact-based test planner, repair loop, structured review, UI/browser test bridge |
|
|
148
|
-
| Adapters |
|
|
188
|
+
| Adapters | Forge Protocol manifest import plus Go, Java, and Spring Boot adapter support for executable external commands and queries |
|
|
149
189
|
| Intent router | `forge do` maps objectives like fix, verify, connect UI, and add feature into plans, files, risks, and next commands |
|
|
150
190
|
| Full-stack map | `frontendGraph` + `capabilityMap` connect routes, components, hooks, runtime entries, tables, policies, and gaps |
|
|
151
191
|
| Dev loop | `forge dev` prints API/Web URLs, phase health, capability coverage, cache status, diagnostics, and next action |
|
|
@@ -166,6 +206,16 @@ forge dev
|
|
|
166
206
|
forge inspect all --json
|
|
167
207
|
forge inspect framework --json
|
|
168
208
|
forge inspect capabilities --json
|
|
209
|
+
forge delta status
|
|
210
|
+
forge timeline
|
|
211
|
+
forge timeline --session current
|
|
212
|
+
forge explain <thing>
|
|
213
|
+
forge explain session current
|
|
214
|
+
forge session list
|
|
215
|
+
forge agent memory --json
|
|
216
|
+
forge mcp serve
|
|
217
|
+
forge import analyze --json
|
|
218
|
+
forge inspect imported --json
|
|
169
219
|
forge doctor
|
|
170
220
|
forge verify --standard
|
|
171
221
|
forge verify --strict
|
|
@@ -187,8 +237,10 @@ Common command groups:
|
|
|
187
237
|
| `forge check --json` | Validate guardrails and emit diagnostics with fix hints |
|
|
188
238
|
| `forge verify --smoke` | Fast local gate: generated drift, Forge checks, typecheck when present, no tests/lint |
|
|
189
239
|
| `forge verify --standard` | Agent development gate: generated drift, Forge/security checks, typecheck, and impact-selected tests |
|
|
190
|
-
| `forge verify --strict` | Full handoff/CI gate: generated drift, Forge/security checks, typecheck, full
|
|
240
|
+
| `forge verify --strict` | Full handoff/CI gate: generated drift, Forge/security checks, typecheck, full TestGraph in bounded parallel/isolated chunks, lint |
|
|
191
241
|
| `forge verify --script-timeout-ms <ms>` | Run package scripts with a predictable timeout and machine-readable timeout diagnostics |
|
|
242
|
+
| `forge verify --test-jobs <n>` | Tune strict TestGraph chunk parallelism; `FORGE_VERIFY_TEST_JOBS` is also supported |
|
|
243
|
+
| `forge verify --strict --test-plan --json` | Print the strict TestGraph scheduler plan without running tests |
|
|
192
244
|
| `forge do "<objective>" --json` | Guided intent router: choose the right workflow, files, risks, and next action |
|
|
193
245
|
| `forge inspect <target> --json` | Inspect generated app/data/runtime/policy/client/agent/UI surfaces |
|
|
194
246
|
| `forge inspect framework --json` | Inspect ForgeOS framework modules, CLI commands, templates, examples, tests, and preferred entrypoints |
|
|
@@ -208,7 +260,10 @@ Common command groups:
|
|
|
208
260
|
| `forge ui` | Browser/UI smoke, scenario, route, snapshot, doctor, and reports |
|
|
209
261
|
| `forge deps` | Package upgrade planning and application |
|
|
210
262
|
| `forge release` | Release/source-map bridge and symbolication |
|
|
211
|
-
| `forge agent`, `forge agent-contract` | Agent-facing contract
|
|
263
|
+
| `forge agent`, `forge agent-contract` | Agent-facing contract, adapter exports, context, install, ingest, and memory commands |
|
|
264
|
+
| `forge mcp serve` | MCP server for external agents to read Forge context, memory, timeline, and inspect surfaces |
|
|
265
|
+
| `forge import analyze`, `forge import inspect` | Brownfield TypeScript/JavaScript app inventory and reviewed migration planning |
|
|
266
|
+
| `forge inspect imported --json` | Inspect `.forge/import` analysis artifacts |
|
|
212
267
|
| `forge self-host` | Self-host packaging and checks |
|
|
213
268
|
|
|
214
269
|
Refactor codemods are AST-aware where safety matters most:
|
|
@@ -243,12 +298,23 @@ See [`examples/showcase-forge-app`](examples/showcase-forge-app/README.md).
|
|
|
243
298
|
|
|
244
299
|
```bash
|
|
245
300
|
cd examples/showcase-forge-app
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
301
|
+
npm install
|
|
302
|
+
npm run generate
|
|
303
|
+
npm run dev
|
|
249
304
|
```
|
|
250
305
|
|
|
251
|
-
|
|
306
|
+
For the reproducible public proof path:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
npm run proof:inspect
|
|
310
|
+
npm run proof:dev
|
|
311
|
+
npm run proof:capabilities
|
|
312
|
+
npm run proof:verify
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Read [`examples/showcase-forge-app/PUBLIC_PROOF.md`](examples/showcase-forge-app/PUBLIC_PROOF.md) for the full walkthrough.
|
|
316
|
+
|
|
317
|
+
Examples are source-only where practical: generated artifacts, `forge.lock`, package lockfiles, and operational `.forge/**` state are recreated locally. The showcase demonstrates tenant-scoped data, policies, commands, queries, liveQueries, outbox actions, workflows, mock AI, telemetry trace IDs, generated React hooks, `agentContract`, `frontendGraph`, `capabilityMap`, and the standard agent handoff loop.
|
|
252
318
|
|
|
253
319
|
## Platform Support
|
|
254
320
|
|
|
@@ -347,7 +413,7 @@ Configure npm Trusted Publisher for package `forgeos`:
|
|
|
347
413
|
| Environment | blank |
|
|
348
414
|
| Allowed action | `npm publish` |
|
|
349
415
|
|
|
350
|
-
Do not add `NPM_TOKEN` for normal
|
|
416
|
+
Do not add `NPM_TOKEN` for normal alpha publishes. Alpha releases publish with the `alpha` dist-tag through npm OIDC Trusted Publisher so prerelease builds do not become `latest` accidentally. Configure `NPM_TOKEN` only when maintainers intentionally want the workflow to promote `latest` with `npm dist-tag add forgeos@<version> latest`; otherwise that step is skipped and `latest` may lag behind `alpha` during hardening. Use `release:publish-local-alpha -- --dry-run` only to validate the staged tarball locally; real npm publishing should go through `release:publish-alpha`, which dispatches `publish.yml` and uses npm OIDC Trusted Publisher. The workflow checks whether the package version already exists before installing dependencies or running tests, then uses `id-token: write`, Node 24/npm 11+, and provenance for the actual publish. `npm run release:smoke` runs `npm pack`, creates a fresh app with the packed tarball, installs dependencies, runs `forge dev --once --json`, and verifies the app smoke path.
|
|
351
417
|
|
|
352
418
|
## Milestone History
|
|
353
419
|
|
|
@@ -394,6 +460,13 @@ H39 Showcase app
|
|
|
394
460
|
H40 Windows/runtime hardening
|
|
395
461
|
H41 Node-compatible CLI/runtime
|
|
396
462
|
H42 Verify observability and quieter app workspaces
|
|
463
|
+
H43 Native AI tools and agent loop
|
|
464
|
+
H44 Ambient DeltaDB recorder
|
|
465
|
+
H45 Automatic work-session inference
|
|
466
|
+
H46 Automatic change grouping
|
|
467
|
+
H47 Semantic timeline
|
|
468
|
+
H48 Agent Memory Bridge
|
|
469
|
+
H49 Brownfield import analysis
|
|
397
470
|
```
|
|
398
471
|
|
|
399
472
|
## Remaining Hardening Before Public Release
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Forge Go Adapter
|
|
2
|
+
|
|
3
|
+
`adapters/go` is the minimal Go SDK for external Forge runtimes. It registers
|
|
4
|
+
commands and queries, emits `forge.manifest.json`, and exposes a Forge-compatible
|
|
5
|
+
HTTP handler.
|
|
6
|
+
|
|
7
|
+
```go
|
|
8
|
+
app := forge.New("billing", forge.BaseURL("http://127.0.0.1:8787"))
|
|
9
|
+
|
|
10
|
+
app.Command("createInvoice", forge.Handle(createInvoice),
|
|
11
|
+
forge.Policy("billing.manage"),
|
|
12
|
+
forge.TenantScoped(true),
|
|
13
|
+
forge.NeedsApproval(true),
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
app.Query("listInvoices", forge.Handle(listInvoices),
|
|
17
|
+
forge.Policy("billing.manage"),
|
|
18
|
+
forge.TenantScoped(true),
|
|
19
|
+
)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The HTTP handler accepts Forge runtime envelopes on `/commands/:name` and
|
|
23
|
+
`/queries/:name`, then returns `{ "ok": true, "result": ... }` envelopes.
|