forgeos 0.1.0-alpha.66 → 0.1.0-alpha.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/.agents/skills/forge-agent-fabric/SKILL.md +137 -0
  2. package/.agents/skills/forge-agent-fabric/references/managed-workflows.md +95 -0
  3. package/.agents/skills/forge-agent-fabric/scripts/fabric.mjs +46 -0
  4. package/.npmignore +19 -19
  5. package/AGENTS.md +1 -1
  6. package/CHANGELOG.md +20 -0
  7. package/LICENSE +21 -21
  8. package/README.md +525 -525
  9. package/adapters/java/README.md +68 -68
  10. package/adapters/java/pom.xml +47 -47
  11. package/adapters/java/src/main/java/dev/forgeos/adapter/Auth.java +20 -20
  12. package/adapters/java/src/main/java/dev/forgeos/adapter/Diagnostic.java +16 -16
  13. package/adapters/java/src/main/java/dev/forgeos/adapter/Entry.java +38 -38
  14. package/adapters/java/src/main/java/dev/forgeos/adapter/EntryKind.java +16 -16
  15. package/adapters/java/src/main/java/dev/forgeos/adapter/ErrorInfo.java +4 -4
  16. package/adapters/java/src/main/java/dev/forgeos/adapter/Forge.java +94 -94
  17. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeCall.java +12 -12
  18. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeContext.java +11 -11
  19. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHandler.java +8 -8
  20. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeHttpHandler.java +179 -179
  21. package/adapters/java/src/main/java/dev/forgeos/adapter/ForgeRegistry.java +121 -121
  22. package/adapters/java/src/main/java/dev/forgeos/adapter/Json.java +14 -14
  23. package/adapters/java/src/main/java/dev/forgeos/adapter/Manifest.java +14 -14
  24. package/adapters/java/src/main/java/dev/forgeos/adapter/RequestEnvelope.java +6 -6
  25. package/adapters/java/src/main/java/dev/forgeos/adapter/ResponseEnvelope.java +25 -25
  26. package/adapters/java/src/main/java/dev/forgeos/adapter/Risk.java +18 -18
  27. package/adapters/java/src/main/java/dev/forgeos/adapter/Schemas.java +36 -36
  28. package/adapters/java/src/main/java/dev/forgeos/adapter/Service.java +65 -65
  29. package/adapters/java/src/main/java/dev/forgeos/adapter/TransactionMode.java +18 -18
  30. package/adapters/java/src/main/java/dev/forgeos/adapter/TypedForgeHandler.java +6 -6
  31. package/adapters/java-spring-boot-starter/README.md +32 -32
  32. package/adapters/java-spring-boot-starter/pom.xml +49 -49
  33. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeCommand.java +22 -22
  34. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeExternalService.java +15 -15
  35. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeQuery.java +16 -16
  36. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeServiceBeanCondition.java +18 -18
  37. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringAutoConfiguration.java +16 -16
  38. package/adapters/java-spring-boot-starter/src/main/java/dev/forgeos/adapter/spring/ForgeSpringRuntime.java +104 -104
  39. package/adapters/java-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +1 -1
  40. package/bin/forge.mjs +38 -38
  41. package/docs/agent-fabric.md +100 -0
  42. package/docs/architecture/agent-fabric/PORTABLE_PROJECTS_PLAN.md +136 -0
  43. package/docs/architecture/agent-fabric/README.md +153 -0
  44. package/examples/java-billing/pom.xml +60 -60
  45. package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/CreateInvoiceInput.java +4 -4
  46. package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Invoice.java +11 -11
  47. package/examples/java-billing/src/main/java/dev/forgeos/examples/billing/Main.java +127 -127
  48. package/package.json +9 -4
  49. package/packages/eslint-plugin-forge/index.ts +15 -15
  50. package/packages/eslint-plugin-forge/package.json +10 -10
  51. package/packages/eslint-plugin-forge/src/check-source.ts +95 -95
  52. package/packages/eslint-plugin-forge/src/load-artifacts.ts +24 -24
  53. package/packages/eslint-plugin-forge/src/rule-no-forge-guard-violation.ts +93 -93
  54. package/schemas/agent-fabric/v0.1/control-event.schema.json +281 -281
  55. package/scripts/field-test-forgeos.mjs +1021 -1021
  56. package/scripts/install-agent-fabric-skill.mjs +105 -0
  57. package/src/forge/_generated/releaseManifest.json +1 -1
  58. package/src/forge/_generated/releaseManifest.ts +3 -3
  59. package/src/forge/agent-adapters/index.ts +7 -3
  60. package/src/forge/agent-adapters/types.ts +1 -0
  61. package/src/forge/agent-fabric/attached-snapshot.ts +55 -0
  62. package/src/forge/agent-fabric/attached-task-contract.ts +105 -0
  63. package/src/forge/agent-fabric/attached-task-service.ts +127 -0
  64. package/src/forge/agent-fabric/attached-task-store.ts +109 -0
  65. package/src/forge/agent-fabric/codex-sdk-worker.ts +163 -0
  66. package/src/forge/agent-fabric/index.ts +19 -0
  67. package/src/forge/agent-fabric/local-adaptive-digest-worker.mjs +26 -26
  68. package/src/forge/agent-fabric/local-task-server.ts +342 -239
  69. package/src/forge/agent-fabric/managed-environment.ts +205 -0
  70. package/src/forge/agent-fabric/managed-run-contract.ts +102 -0
  71. package/src/forge/agent-fabric/managed-run-service.ts +392 -0
  72. package/src/forge/agent-fabric/managed-run-store.ts +145 -0
  73. package/src/forge/agent-fabric/managed-workspace.ts +214 -0
  74. package/src/forge/agent-fabric/project-profile.ts +50 -0
  75. package/src/forge/agent-fabric/project-registry.ts +120 -0
  76. package/src/forge/agent-fabric/project-runtime.ts +85 -0
  77. package/src/forge/agent-fabric/readiness.ts +26 -0
  78. package/src/forge/agent-fabric/workflow-engine.ts +218 -0
  79. package/src/forge/agent-fabric/workflow-task-actions.ts +104 -0
  80. package/src/forge/agent-fabric/workflow-templates.ts +11 -0
  81. package/src/forge/agent-memory/bridge.ts +309 -47
  82. package/src/forge/agent-memory/context-pack.ts +8 -1
  83. package/src/forge/agent-memory/hook-runner.ts +38 -19
  84. package/src/forge/agent-memory/mcp.ts +536 -324
  85. package/src/forge/agent-memory/sources/codex-hook-runner.mjs +343 -234
  86. package/src/forge/agent-memory/sources/codex.ts +49 -7
  87. package/src/forge/agent-memory/types.ts +11 -0
  88. package/src/forge/bench.ts +154 -154
  89. package/src/forge/cair/action-journal.ts +61 -61
  90. package/src/forge/cair/action-parser.ts +314 -314
  91. package/src/forge/cair/action-validator.ts +40 -40
  92. package/src/forge/cair/actions.ts +1818 -1818
  93. package/src/forge/cair/format.ts +77 -77
  94. package/src/forge/cair/index.ts +106 -106
  95. package/src/forge/cair/query.ts +478 -478
  96. package/src/forge/cair/snapshot.ts +315 -315
  97. package/src/forge/cair/types.ts +248 -248
  98. package/src/forge/cli/ai.ts +816 -816
  99. package/src/forge/cli/codex-app-server.ts +877 -877
  100. package/src/forge/cli/fabric.ts +231 -153
  101. package/src/forge/cli/index.ts +26 -26
  102. package/src/forge/cli/main.ts +16 -1
  103. package/src/forge/cli/next-actions.ts +23 -23
  104. package/src/forge/cli/parse.ts +40 -4
  105. package/src/forge/cli/release.ts +309 -309
  106. package/src/forge/cli/self-host.ts +510 -510
  107. package/src/forge/compiler/ai-registry/parse.ts +219 -219
  108. package/src/forge/compiler/app-graph/classify.ts +10 -10
  109. package/src/forge/compiler/app-graph/dup-symbol.ts +29 -29
  110. package/src/forge/compiler/app-graph/extract.ts +231 -231
  111. package/src/forge/compiler/app-graph/forge-apis.ts +25 -25
  112. package/src/forge/compiler/app-graph/index.ts +11 -11
  113. package/src/forge/compiler/app-graph/module-graph.ts +151 -151
  114. package/src/forge/compiler/app-graph/parser.ts +71 -71
  115. package/src/forge/compiler/app-graph/symbols.ts +48 -48
  116. package/src/forge/compiler/app-graph/types.ts +43 -43
  117. package/src/forge/compiler/app-graph/versions.ts +14 -14
  118. package/src/forge/compiler/cache/index.ts +17 -17
  119. package/src/forge/compiler/cache/key.ts +46 -46
  120. package/src/forge/compiler/cache/scheduler.ts +72 -72
  121. package/src/forge/compiler/cache/store.ts +78 -78
  122. package/src/forge/compiler/classifier/capabilities.ts +64 -64
  123. package/src/forge/compiler/classifier/classify.ts +76 -76
  124. package/src/forge/compiler/classifier/contexts.ts +188 -188
  125. package/src/forge/compiler/classifier/index.ts +18 -18
  126. package/src/forge/compiler/classifier/runtime-matrix.ts +45 -45
  127. package/src/forge/compiler/classifier/secrets.ts +31 -31
  128. package/src/forge/compiler/classifier/signals.ts +95 -95
  129. package/src/forge/compiler/client-sdk/build-manifest.ts +210 -210
  130. package/src/forge/compiler/data-graph/sql/serialize.ts +89 -89
  131. package/src/forge/compiler/data-graph/sql/types.ts +38 -38
  132. package/src/forge/compiler/diagnostics/index.ts +57 -57
  133. package/src/forge/compiler/emitter/artifact-kind.ts +14 -14
  134. package/src/forge/compiler/emitter/barrel.ts +47 -47
  135. package/src/forge/compiler/emitter/constants.ts +7 -7
  136. package/src/forge/compiler/emitter/emit.ts +223 -223
  137. package/src/forge/compiler/emitter/index.ts +24 -24
  138. package/src/forge/compiler/emitter/lock.ts +61 -61
  139. package/src/forge/compiler/external-manifest/registry.ts +205 -205
  140. package/src/forge/compiler/external-manifest/types.ts +91 -91
  141. package/src/forge/compiler/external-manifest/validate.ts +373 -373
  142. package/src/forge/compiler/frontend-graph/build.ts +623 -623
  143. package/src/forge/compiler/guards/artifacts.ts +96 -96
  144. package/src/forge/compiler/guards/check-import-guards.ts +106 -106
  145. package/src/forge/compiler/guards/index.ts +11 -11
  146. package/src/forge/compiler/guards/propagate-contexts.ts +57 -57
  147. package/src/forge/compiler/index.ts +17 -17
  148. package/src/forge/compiler/integration/index.ts +17 -17
  149. package/src/forge/compiler/integration/snapshot.ts +54 -54
  150. package/src/forge/compiler/integration/templates/convex.ts +70 -70
  151. package/src/forge/compiler/orchestrator/discover.ts +214 -214
  152. package/src/forge/compiler/orchestrator/guards.ts +5 -5
  153. package/src/forge/compiler/orchestrator/index.ts +27 -27
  154. package/src/forge/compiler/orchestrator/orphans.ts +51 -51
  155. package/src/forge/compiler/orchestrator/profile.ts +23 -23
  156. package/src/forge/compiler/orchestrator/serialize.ts +979 -979
  157. package/src/forge/compiler/orchestrator/verify.ts +35 -35
  158. package/src/forge/compiler/package-graph/capabilities-stub.ts +33 -33
  159. package/src/forge/compiler/package-graph/checksum.ts +107 -107
  160. package/src/forge/compiler/package-graph/exports-discovery.ts +91 -91
  161. package/src/forge/compiler/package-graph/extract-dts.ts +32 -32
  162. package/src/forge/compiler/package-graph/index.ts +24 -24
  163. package/src/forge/compiler/package-graph/jsdoc.ts +50 -50
  164. package/src/forge/compiler/package-graph/oracle.ts +326 -326
  165. package/src/forge/compiler/package-graph/read-file.ts +21 -21
  166. package/src/forge/compiler/package-graph/resolve.ts +131 -131
  167. package/src/forge/compiler/package-manager/adapter.ts +240 -240
  168. package/src/forge/compiler/package-manager/commands.ts +51 -51
  169. package/src/forge/compiler/package-manager/detect.ts +65 -65
  170. package/src/forge/compiler/package-manager/executor.ts +146 -146
  171. package/src/forge/compiler/package-manager/index.ts +22 -22
  172. package/src/forge/compiler/package-manager/parse-spec.ts +16 -16
  173. package/src/forge/compiler/primitives/compare.ts +26 -26
  174. package/src/forge/compiler/primitives/hash.ts +29 -29
  175. package/src/forge/compiler/primitives/header.ts +43 -43
  176. package/src/forge/compiler/primitives/index.ts +45 -45
  177. package/src/forge/compiler/primitives/paths.ts +24 -24
  178. package/src/forge/compiler/primitives/serialize.ts +66 -66
  179. package/src/forge/compiler/primitives/sort.ts +87 -87
  180. package/src/forge/compiler/recipes/helpers.ts +37 -37
  181. package/src/forge/compiler/sandbox/artifact-sanitize.ts +26 -26
  182. package/src/forge/compiler/sandbox/backends/child.ts +123 -123
  183. package/src/forge/compiler/sandbox/backends/docker.ts +173 -173
  184. package/src/forge/compiler/sandbox/index.ts +51 -51
  185. package/src/forge/compiler/sandbox/inspect.ts +143 -143
  186. package/src/forge/compiler/sandbox/inspector-entry.ts +115 -115
  187. package/src/forge/compiler/sandbox/limits.ts +31 -31
  188. package/src/forge/compiler/sandbox/scrub-env.ts +60 -60
  189. package/src/forge/compiler/sandbox/secret-scan.ts +54 -54
  190. package/src/forge/compiler/sandbox/serialize.ts +106 -106
  191. package/src/forge/compiler/sandbox/types.ts +7 -7
  192. package/src/forge/compiler/test-graph/build.ts +285 -285
  193. package/src/forge/compiler/types/app-graph.ts +87 -87
  194. package/src/forge/compiler/types/capability.ts +29 -29
  195. package/src/forge/compiler/types/classification.ts +9 -9
  196. package/src/forge/compiler/types/diagnostic.ts +2 -2
  197. package/src/forge/compiler/types/frontend-graph.ts +81 -81
  198. package/src/forge/compiler/types/import-guards.ts +19 -19
  199. package/src/forge/compiler/types/index.ts +98 -98
  200. package/src/forge/compiler/types/json.ts +3 -3
  201. package/src/forge/compiler/types/lock.ts +37 -37
  202. package/src/forge/compiler/types/runtime-matrix.ts +16 -16
  203. package/src/forge/compiler/types/runtime.ts +30 -30
  204. package/src/forge/compiler/types/sandbox.ts +24 -24
  205. package/src/forge/delta/broker-runner.mjs +5 -0
  206. package/src/forge/delta/broker.ts +429 -0
  207. package/src/forge/delta/classifier.ts +52 -52
  208. package/src/forge/delta/explain.ts +238 -238
  209. package/src/forge/delta/git-observer.ts +24 -0
  210. package/src/forge/delta/ids.ts +40 -40
  211. package/src/forge/delta/index.ts +25 -25
  212. package/src/forge/delta/process-identity.ts +31 -0
  213. package/src/forge/delta/queue-status.ts +190 -0
  214. package/src/forge/delta/redaction.ts +50 -50
  215. package/src/forge/delta/schema.ts +135 -135
  216. package/src/forge/delta/session.ts +142 -142
  217. package/src/forge/delta/status.ts +82 -145
  218. package/src/forge/delta/store.ts +77 -32
  219. package/src/forge/delta/timeline.ts +178 -178
  220. package/src/forge/dev/types.ts +63 -63
  221. package/src/forge/dev/watch.ts +119 -119
  222. package/src/forge/intent/index.ts +509 -509
  223. package/src/forge/make/types.ts +153 -153
  224. package/src/forge/refactor/index.ts +1937 -1937
  225. package/src/forge/refactor/runtime-rename.ts +598 -598
  226. package/src/forge/repair/rules/index.ts +476 -476
  227. package/src/forge/review/types.ts +211 -211
  228. package/src/forge/runtime/db/generated-client.ts +305 -305
  229. package/src/forge/runtime/db/pglite-adapter.ts +33 -11
  230. package/src/forge/runtime/runner/run-entry.ts +236 -236
  231. package/src/forge/version.ts +1 -1
  232. package/templates/agent-workroom/AGENTS.md +29 -29
  233. package/templates/agent-workroom/README.md +34 -34
  234. package/templates/agent-workroom/forge.config.ts +3 -3
  235. package/templates/agent-workroom/package.json +34 -34
  236. package/templates/agent-workroom/pnpm-workspace.yaml +2 -2
  237. package/templates/agent-workroom/src/actions/indexAgentSignal.ts +10 -10
  238. package/templates/agent-workroom/src/commands/openWorkroom.ts +61 -61
  239. package/templates/agent-workroom/src/commands/recordAgentSignal.ts +119 -119
  240. package/templates/agent-workroom/src/commands/recordCheckRun.ts +52 -52
  241. package/templates/agent-workroom/src/forge/schema.ts +54 -54
  242. package/templates/agent-workroom/src/policies.ts +6 -6
  243. package/templates/agent-workroom/src/queries/listWorkrooms.ts +11 -11
  244. package/templates/agent-workroom/src/queries/liveWorkroom.ts +63 -63
  245. package/templates/agent-workroom/tsconfig.json +16 -16
  246. package/templates/agent-workroom/web/index.html +13 -13
  247. package/templates/agent-workroom/web/package.json +21 -21
  248. package/templates/agent-workroom/web/src/App.tsx +345 -345
  249. package/templates/agent-workroom/web/src/main.tsx +13 -13
  250. package/templates/agent-workroom/web/src/styles.css +545 -545
  251. package/templates/agent-workroom/web/tsconfig.json +27 -27
  252. package/templates/b2b-support-web/package.json +37 -37
  253. package/templates/b2b-support-web/pnpm-workspace.yaml +2 -2
  254. package/templates/b2b-support-web/web/package.json +21 -21
  255. package/templates/minimal-web/package.json +34 -34
  256. package/templates/minimal-web/pnpm-workspace.yaml +2 -2
  257. package/templates/minimal-web/web/index.html +13 -13
  258. package/templates/minimal-web/web/src/styles.css +190 -190
  259. package/templates/nuxt-web/.vscode/settings.json +14 -14
  260. package/templates/nuxt-web/.yarnrc.yml +1 -1
  261. package/templates/nuxt-web/README.md +30 -30
  262. package/templates/nuxt-web/forge.config.ts +3 -3
  263. package/templates/nuxt-web/package.json +34 -34
  264. package/templates/nuxt-web/pnpm-workspace.yaml +2 -2
  265. package/templates/nuxt-web/src/actions/logNoteCreated.ts +11 -11
  266. package/templates/nuxt-web/src/commands/createNote.ts +26 -26
  267. package/templates/nuxt-web/src/forge/schema.ts +12 -12
  268. package/templates/nuxt-web/src/policies.ts +6 -6
  269. package/templates/nuxt-web/src/queries/listNotes.ts +8 -8
  270. package/templates/nuxt-web/src/queries/liveNotes.ts +8 -8
  271. package/templates/nuxt-web/tsconfig.json +17 -17
  272. package/templates/nuxt-web/web/app.vue +67 -67
  273. package/templates/nuxt-web/web/components/LiveNotes.vue +89 -89
  274. package/templates/nuxt-web/web/components/NoteComposer.vue +100 -100
  275. package/templates/nuxt-web/web/composables/forge.ts +13 -13
  276. package/templates/nuxt-web/web/composables/useNotes.ts +24 -24
  277. package/templates/nuxt-web/web/nuxt.config.ts +11 -11
  278. package/templates/nuxt-web/web/package.json +19 -19
  279. package/templates/nuxt-web/web/plugins/forge.client.ts +10 -10
  280. package/templates/nuxt-web/web/plugins/forge.server.ts +10 -10
  281. package/templates/nuxt-web/web/server/api/forge-health.get.ts +7 -7
  282. package/templates/nuxt-web/web/tsconfig.json +6 -6
  283. package/templates/vendor-access/.vscode/settings.json +14 -14
  284. package/templates/vendor-access/README.md +30 -30
  285. package/templates/vendor-access/package.json +35 -35
  286. package/templates/vendor-access/pnpm-workspace.yaml +2 -2
  287. package/templates/vendor-access/tsconfig.json +17 -17
  288. package/templates/vendor-access/web/index.html +13 -13
  289. package/templates/vendor-access/web/package.json +21 -21
  290. package/templates/vendor-access/web/src/styles.css +682 -682
  291. package/templates/vendor-access/web/tsconfig.json +18 -18
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: forge-agent-fabric
3
+ description: Conduct or resume a Forge Agent Fabric coding task with persistent workflow steps, independent Codex review, and source-bound evidence when the user requests this workflow.
4
+ ---
5
+
6
+ # Forge Agent Fabric
7
+
8
+ Keep the user's conversation in Codex. Prepare protocol requests yourself; the user should
9
+ not need to write JSON or operate a second interface. Respect the user's task scope and
10
+ existing authorization. This skill does not authorize publication, deployments or external
11
+ messages. Use subagents for implementation/review when authorized by the user or project.
12
+
13
+ ## Locate and connect
14
+
15
+ Resolve the current project's Git root and read its AGENTS.md. Execute with that root
16
+ as cwd, even when the runtime is installed elsewhere. Windows and WSL copies are distinct
17
+ projects. This workflow does not require a Forge application or project dependency.
18
+
19
+ Use the absolute path to this skill's `scripts/fabric.mjs` helper:
20
+ `node <skill-directory>/scripts/fabric.mjs --project <target-git-root> <operation> --json`.
21
+ It reads installer-generated runtime.json or FORGE_FABRIC_CLI and falls back to an installed
22
+ Forge runtime on PATH. Never switch to the runtime's checkout to conduct work.
23
+
24
+ Run `doctor --json` and `ensure-owner --json` through that helper. Register projects with
25
+ `project-register --project-id <stable-id> --json`; inspect registrations with `project-list --json`.
26
+ Registration is needed for multiproject MCP routing, not for ordinary cwd-bound CLI work.
27
+ Optional project preparation, verification and limits live in `.forge/fabric.json`;
28
+ inspect doctor and respect the current project's profile rather than inventing config fields.
29
+
30
+ Forward `capabilities --json` through the helper to distinguish accompanied tasks,
31
+ managed SDK runs and the legacy Ollama pilot. When the user asks Fabric to execute a
32
+ workflow or run Codex workers, select managed execution below. Choose accompanied mode
33
+ when the task is to record work performed by the native session. Both modes need one
34
+ owner; `ensure-owner` reuses or starts it without dispatching workers.
35
+ Do not open the legacy PGlite database independently or kill an unrelated owner.
36
+
37
+ Native MCP tools are `fabric_attached_*`, `fabric_workflow_*` and `fabric_run_*`. If unavailable, the CLI
38
+ offers the same operations. State which transport you actually demonstrated.
39
+ Do not register MCP or change global configuration as a side effect of using this skill.
40
+
41
+ Read [managed request fields and examples](references/managed-workflows.md) before
42
+ preparing run-start. The references travel with this skill and require no Forge checkout.
43
+ For MCP, inspect tool schemas and select the registered target project explicitly through
44
+ projectId when supported. A fixed-root MCP server is usable only when its root matches
45
+ the target. Never assume a global MCP configuration follows the chat cwd.
46
+
47
+ ## Accompanied work
48
+
49
+ 1. Create an `attached-propose` with explicit acceptance criteria, relevant file scope and
50
+ checks. Mutations use a complete `--file` JSON request; reads use `--task-id`.
51
+ 2. Attach the actual session/agent identity, register an implementation assignment and
52
+ start its attempt. Use actual IDs from the host, not invented claims of verified identity.
53
+ 3. For a composed task, record `workflow-plan` and use `workflow-next` packets. Claim a
54
+ step before executing it, then report output digest and evidence. Before checking or
55
+ reviewing source, capture the current snapshot digest from `attached-status`. Successful
56
+ `workflow-result` and `workflow-reconcile` requests must include that actual observed
57
+ digest in the top-level `observedSnapshotDigest` field. Do not fetch a newer digest merely
58
+ to stamp an older result; if source changed, reconcile obsolete work as failed and
59
+ replan or execute a fresh attempt. The scheduler records
60
+ work; it does not invoke the host's subagent tools for you.
61
+ 4. Complete implementation and prepare a review with a distinct reviewer attempt.
62
+ Give that Codex subagent requirements, code and the returned exact snapshot/token.
63
+ Submit its report only for that version. Correct findings and obtain a new review
64
+ when files change. Do not mark findings resolved without corrective evidence.
65
+ 5. Run the checks relevant to the change and record their outcomes for the current
66
+ snapshot. Record criterion coverage with concrete artifacts or observed checks.
67
+ 6. Read `attached-status`. Address the structured unmet reasons before presenting the
68
+ task as ready. Agent-reported records retain that provenance; they are not authenticated
69
+ service executions, human acceptance or proof of production deployment.
70
+
71
+ Reuse a requestId only for the exact same request, including expectedVersion. On a version
72
+ conflict read current state and reconcile; use a new requestId for a new operation. Mutation
73
+ responses are compact acknowledgements; status/context reads return current full state.
74
+
75
+ ## Resume and adapt
76
+
77
+ Start with `attached-context` for the known taskId. Do not restart completed work from the
78
+ conversation summary alone. After a host crash use `workflow-recover` for known interrupted
79
+ attempts and reconcile their observed outcomes before dispatching them again. A missing
80
+ result is uncertainty, not success or permission to repeat an effect.
81
+
82
+ Use `workflow-replan` with the expected revision, reason and evidenceRefs. Preserve
83
+ required obligations. Source changes make recorded results stale; the service blocks
84
+ their reuse and replan invalidates affected steps and their dependents. The current
85
+ release binds results conservatively to the task's whole file scope; choose a relevant
86
+ scope and do not promise fine-grained invalidation by individual inputRefs.
87
+
88
+ Keep hooks observational. Missing hook events do not prevent explicit session/tentative
89
+ registration, but do prevent claiming that native hook integration has been demonstrated.
90
+ The accompanied mode recovers work when Codex returns. Managed SDK runs now have a
91
+ separate executor, but still require a live owner; neither mode installs automatic wakeup
92
+ or guarantees execution after the App closes.
93
+
94
+ ## Managed execution
95
+
96
+ Choose managed execution when the authorized task calls for owner-dispatched SDK or
97
+ command workers. Keep the native chat as the interface and prepare requests yourself.
98
+ Starting Codex workers can consume configured credits; local publication can change
99
+ files. Use the user's existing scope and authorization, including any cost constraints.
100
+ Do not treat the legacy proposal-only MCP contract as a limit on fabric_run_start.
101
+
102
+ 1. Read capabilities and the managed request example in the bundled reference. Prepare
103
+ run-start with requestId, goal, scope, workflow and one executor per node. Codex roles
104
+ are implementer/reviewer/investigator/decision; commands use explicit argv. Choose
105
+ relevant limits, deadlines and scope. inputDigest identifies the declared node contract;
106
+ the owner separately captures actual source inputs. Clones do not copy root node_modules;
107
+ automatic environment preparation installs locked dependencies or copies verified cache
108
+ into the clone, with scripts ignored by default. Optional environment accepts mode
109
+ auto/none, ignoreScripts, HTTPS registry without credentials/query/fragment, and timeoutMs
110
+ 100..1800000. Use none for dependency-free steps. Do not assume ignored scripts executed.
111
+ 2. Start via `fabric run-start --file run.json --json` or fabric_run_start with
112
+ `{request: BODY}`. Read `run-status --run-id ID`; use run-wait with
113
+ `{runId,cursor,waitMs}` for bounded events, up to 30000 ms. MCP status uses `{runId}`.
114
+ Start and mutations return compact acks; status provides full public state and artifacts.
115
+ 3. For publication, use an implementer activity, a required distinct Codex reviewer
116
+ downstream of every writer, and a required command verification downstream of every
117
+ writer. Reviewer approval, command success and workflow completion are required.
118
+ publish false keeps isolated artifacts; publication applies local scoped files and
119
+ does not authorize commit, push or deployment. Do not claim that a model's report is
120
+ executor evidence: state is executor_observed, reports remain agent_reported, and
121
+ outputContract.requiredEvidenceKinds accepts only `executor-observed`.
122
+ 4. Steer queues instruction and pauses new dispatch; it does not message the active worker.
123
+ Pause allows active workers to finish. All controls use runId/requestId/expectedVersion.
124
+ Resume optionally adds expectedRevision/nodes/executors/reason/evidenceRefs for replan.
125
+ Read status after version conflicts and issue a new requestId for a changed body.
126
+ 5. After cancellation or owner restart, inspect the saved thread, workspace and effects.
127
+ Unknown attempts require run-reconcile with attemptId, resolution failed and reason;
128
+ never manufacture success or retry uncertain effects silently. A new isolated attempt
129
+ may use the saved SDK thread. Publication confirmation uses publication confirm only
130
+ when the owner can observe matching expected files. Resolve uncertainty before resume.
131
+ Publication retry is allowed only after observing the complete original baseline; it
132
+ clears the intent and pauses. Resume explicitly; preserve partial divergent writes.
133
+
134
+ Distinguish implementation, command-fixture tests and actual SDK execution in the delivery
135
+ report. Do not extend a past pilot's acceptance to a new environment or task without
136
+ observed evidence. SDK workers are separate runs, not new chats in the sidebar. Keep the owner session
137
+ visible in task context; do not promise App-closed execution or create a scheduler implicitly.
@@ -0,0 +1,95 @@
1
+ # Managed Codex workflows
2
+
3
+ Commands below are Fabric operation arguments forwarded through `scripts/fabric.mjs`.
4
+ Use the current target Git root, not the directory containing the runtime. The owner
5
+ captures source from that root and creates isolated Git clones. No root node_modules
6
+ directory is shared with clones. A runtime installation is reusable across repositories.
7
+
8
+ ## Request shape
9
+
10
+ Prepare `run-start --file <absolute-request.json> --json`; the request file must be inside
11
+ the target Git root. Mutations use a complete JSON
12
+ body; reads use `run-status --run-id ID --json`. The following command-only example
13
+ needs an existing tracked `source.txt` and a working absolute Node executable. Generate
14
+ a fresh requestId for each independent run. Replace example paths with observed paths.
15
+
16
+ ```json
17
+ {
18
+ "requestId": "command-smoke-1",
19
+ "goal": "Observe a command in an isolated clone",
20
+ "scope": ["source.txt"],
21
+ "publish": false,
22
+ "environment": {"mode": "none"},
23
+ "workflow": {"workflowId": "command-smoke", "nodes": [{
24
+ "nodeId": "verify", "kind": "verification", "dependsOn": [],
25
+ "inputDigest": "sha256:2689367b205c16ce32ed4200942b8b8b1e262dfc70d9bc9fbc77c49699a4f1df",
26
+ "required": true,
27
+ "outputContract": {"requiredEvidenceKinds": ["executor-observed"]}
28
+ }]},
29
+ "executors": [{"nodeId": "verify", "type": "command",
30
+ "argv": ["/absolute/path/to/node", "-e", "process.stdout.write('ok')"],
31
+ "timeoutMs": 10000}]
32
+ }
33
+ ```
34
+
35
+ inputDigest describes the node contract, not the observed source. Calculate SHA-256
36
+ for each actual declared contract. The example digest is SHA-256 of `ok` for this smoke.
37
+ The owner separately captures source inputs. Evidence kind `executor-observed` means
38
+ execution was observed; a model report's content remains `agent_reported`.
39
+
40
+ For code use `implement -> review -> verify` with one executor per node:
41
+
42
+ - implement: `kind: activity`, executor `{nodeId,type:"codex",role:"implementer",prompt,writeScope:[...]}`.
43
+ - review: required activity, Codex `role:"reviewer"`, depending on every writer, prompt requesting independent review and explicit approval/findings.
44
+ - verify: required verification, `type:"command"`, explicit `argv`, depending on every writer; use actual project tests/build checks.
45
+
46
+ Scopes and writeScope are repository-relative. Ensure writeScope stays inside the run
47
+ scope. Set timeoutMs and limits appropriate to the task. Use capabilities/doctor to check
48
+ current constraints. Maximum supported concurrency is four; prefer a small useful fanout.
49
+ Do not prescribe a test command without reading the project's scripts or AGENTS.md.
50
+
51
+ Optional top-level run environment: mode `auto` (default) or `none`, ignoreScripts (default
52
+ true), HTTPS registry without credentials/query/fragment, timeoutMs 100..1800000.
53
+ Auto prepares locked dependencies or copies verified cache content into the clone.
54
+ Ignored scripts have not executed; enable necessary preparation only within authorization.
55
+ An optional `.forge/fabric.json` profile supplies maxConcurrency and environment defaults
56
+ for run-start; explicit request fields win. verificationCommands are suggested argv arrays
57
+ for the agent to select, never commands executed by doctor. Supported profile shape:
58
+ `{schemaVersion:1,maxConcurrency:2,environment:{mode:"auto",ignoreScripts:true},verificationCommands:[["node","--test"]]}`.
59
+
60
+ Publication is local file application, not npm publication. `publish:false` keeps clones
61
+ and artifacts. `publish:true` (the default) requires approval from a distinct required
62
+ Codex reviewer and successful required command verification downstream of all writers.
63
+ Do not claim a model report proves a successful command, production deployment or human
64
+ acceptance. Run with explicit publication intent matching the user's request.
65
+
66
+ ## Controls and recovery
67
+
68
+ | Operation | Body |
69
+ | --- | --- |
70
+ | run-wait | `{runId,cursor?,waitMs}`; waitMs 0..30000 |
71
+ | run-pause/run-resume/run-cancel | `{runId,requestId,expectedVersion}` |
72
+ | run-steer | CAS fields plus `instruction`; pauses new dispatch |
73
+ | run-reconcile | CAS fields plus `{attemptId,resolution:"failed",reason}` for uncertain attempts |
74
+
75
+ Mutation acknowledgements are compact. Read run-status for full public state, source
76
+ versions, attempts, artifacts and unmet requirements. Reuse requestId only for an exact
77
+ body replay. After a version conflict read status and create a new requestId for a changed
78
+ operation. Pause allows active workers to finish; steer does not inject messages into the
79
+ active worker. Cancel requests interruption without rolling back external effects.
80
+
81
+ Resume can replan with expectedRevision, nodes, executors, reason and evidenceRefs.
82
+ Preserve required obligations, evidence requirements and limits. Source changes invalidate
83
+ applicable results. Failed or uncertain attempts must not be represented as success.
84
+
85
+ After an owner restart or interruption inspect saved workspace, SDK thread ID and effects.
86
+ Unknown results require reconciliation before retry. New isolated attempts may reuse a
87
+ saved SDK thread. Publication confirmation `{publication:"confirm"}` requires the owner
88
+ to observe matching expected files. Retry `{publication:"retry"}` requires the complete
89
+ original baseline, pauses the run, and needs explicit resume. Preserve divergent partial
90
+ writes instead of overwriting them.
91
+
92
+ MCP run mutations receive `{request: BODY}` plus projectId when routing is enabled;
93
+ status receives `{runId}` plus projectId. Always inspect the available tool schema.
94
+ CLI and MCP must target the same registered root. A configured MCP server being present
95
+ does not prove its tool catalog is loaded or its owner is alive.
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, realpathSync, existsSync } from 'node:fs';
3
+ import { dirname, resolve, isAbsolute } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { spawnSync } from 'node:child_process';
6
+
7
+ // Runtime identity is independent of the target project: no cwd from runtime config.
8
+ const skillRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
9
+ try {
10
+ const args = process.argv.slice(2);
11
+ let project = process.cwd();
12
+ const index = args.indexOf('--project');
13
+ if (index >= 0) {
14
+ if (!args[index + 1]) throw new Error('--project requires a target directory');
15
+ project = args[index + 1];
16
+ args.splice(index, 2);
17
+ }
18
+ const git = spawnSync('git', ['-C', project, 'rev-parse', '--show-toplevel'], { encoding: 'utf8', windowsHide: true });
19
+ if (git.status !== 0) throw new Error(`Target must be a Git repository: ${project}`);
20
+ const cwd = realpathSync(git.stdout.trim());
21
+ let runtime = {};
22
+ const config = resolve(skillRoot, 'runtime.json');
23
+ if (existsSync(config)) runtime = JSON.parse(readFileSync(config, 'utf8'));
24
+ let cliPath = process.env.FORGE_FABRIC_CLI || runtime.cliPath;
25
+ if (!cliPath) {
26
+ const lookup = spawnSync(process.platform === 'win32' ? 'where.exe' : 'which', ['forge'], { encoding: 'utf8', windowsHide: true });
27
+ const candidates = lookup.stdout?.trim().split(/\r?\n/).filter(Boolean) || [];
28
+ for (const candidate of candidates) {
29
+ const bin = realpathSync(candidate);
30
+ const guesses = [bin, resolve(dirname(bin), 'node_modules/forgeos/bin/forge.mjs')];
31
+ cliPath = guesses.find((path) => path.endsWith('.mjs') && existsSync(path));
32
+ if (cliPath) break;
33
+ }
34
+ }
35
+ if (!cliPath || !isAbsolute(cliPath) || !existsSync(cliPath)) {
36
+ throw new Error('Forge runtime not found. Install this skill with --runtime <absolute forge.mjs>, or set FORGE_FABRIC_CLI to that absolute file.');
37
+ }
38
+ const result = spawnSync(runtime.nodeExecutable || process.execPath, [realpathSync(cliPath), 'fabric', ...args], {
39
+ cwd, stdio: 'inherit', windowsHide: true,
40
+ });
41
+ if (result.error) throw result.error;
42
+ process.exitCode = result.status ?? 1;
43
+ } catch (error) {
44
+ process.stderr.write(`${error.message}\n`);
45
+ process.exitCode = 1;
46
+ }
package/.npmignore CHANGED
@@ -1,19 +1,19 @@
1
- # Package contents are primarily controlled by package.json "files".
2
- node_modules/
3
- .git/
4
- .github/
5
- .forge/
6
- tests/
7
- examples/
8
- adapters/**/target/
9
- examples/**/target/
10
- *.class
11
- *.jar
12
- **/*.class
13
- **/*.jar
14
- src/forge/_generated/**
15
- !src/forge/_generated/
16
- !src/forge/_generated/releaseManifest.json
17
- !src/forge/_generated/releaseManifest.ts
18
- *.tgz
19
- npm-debug.log*
1
+ # Package contents are primarily controlled by package.json "files".
2
+ node_modules/
3
+ .git/
4
+ .github/
5
+ .forge/
6
+ tests/
7
+ examples/
8
+ adapters/**/target/
9
+ examples/**/target/
10
+ *.class
11
+ *.jar
12
+ **/*.class
13
+ **/*.jar
14
+ src/forge/_generated/**
15
+ !src/forge/_generated/
16
+ !src/forge/_generated/releaseManifest.json
17
+ !src/forge/_generated/releaseManifest.ts
18
+ *.tgz
19
+ npm-debug.log*
package/AGENTS.md CHANGED
@@ -1,4 +1,4 @@
1
- // @forge-generated generator=0.1.0-alpha.66 input=57341432921f2c43eddb033a05cc7ad25dabd9813fcf2fd64c67f74ae5f61859 content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
1
+ // @forge-generated generator=0.1.0-alpha.68 input=eb85ce79777e8854119a312edd29262099578bdd5f8be82c03b5f0caae80f391 content=721818a6f9a664aa898092d4aa5cd68cbbd8ad6e150c7d3ad3ef785a2e3fcf53
2
2
  # AGENTS.md
3
3
 
4
4
  <!-- forge-generated:start -->
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # forgeos
2
2
 
3
+ ## 0.1.0-alpha.68
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3d41af7`](https://github.com/Stahldavid/forge/commit/3d41af7b4580cd86618a7c76a3ac33b41e495e43) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Make Agent Fabric reusable across Git repositories from the original Codex chat. Distribute a portable personal skill and installer, discover and reuse per-project owners, route MCP calls by registered project identity, and apply optional project environment and concurrency defaults. Harden Windows lock reads and owner startup failures, and exercise isolated execution outside the Forge checkout.
8
+
9
+ ## 0.1.0-alpha.67
10
+
11
+ ### Patch Changes
12
+
13
+ - [#68](https://github.com/Stahldavid/forge/pull/68) [`444d89a`](https://github.com/Stahldavid/forge/commit/444d89a1041f0005663ffa3f37611a0f2821022a) Thanks [@Stahldavid](https://github.com/Stahldavid)! - Keep Codex hook events available to Agent Memory through a local Delta owner.
14
+ Automatically resume the redacted hook queue, deduplicate events after a crash,
15
+ report queue freshness in CLI and MCP results, and distinguish real database
16
+ errors from an unverified PGlite lock file.
17
+
18
+ - Add durable Codex SDK dynamic workflows driven from the original Codex chat, with isolated workers, dependency preparation, independent review, scoped artifact publication and explicit interruption recovery. Reduce duplicate CI checks and parallelize package validation while preserving release gates. Fix Windows hook subprocess diagnostics and managed execution races.
19
+ Upgrade Changesets to v3 with compatible prerelease checks, update the Next.js template to 16.3.8, and close temporary Delta owners before packed-package smoke cleanup on Windows.
20
+
21
+ - Normalize POSIX process start timestamps to UTC so live Delta owners and queue leases are not mistaken for reused PIDs when the runtime and host use different time zones.
22
+
3
23
  ## 0.1.0-alpha.66
4
24
 
5
25
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,21 +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.
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.