Skip to content

Commit 7dedf30

Browse files
os-zhuangclaude
andcommitted
feat(runtime): extract action-execution subsystem — ADR-0076 D11 step ③ PR-8 (#2462)
16 helpers (~560 lines) behind server-registered business actions move to action-execution.ts on the narrow ActionExecutionDeps slice (resolveService + getObjectQL — deliberately NO env-resolution state; that stays with route handlers). The ADR-0104 warn-once statics (actionParamsStrict/warnActionParamsOnce) ride along as module functions — they were HttpDispatcher statics the extracted body referenced, which would have made a value-cycle back into the dispatcher. Dispatcher keeps 4 thin delegates that have in-class callers (callData/enforceActionParams/actionPermissionError/buildActionSession); the 12 internal-only helpers are invoked directly on the module (5 call sites in buildMcpBridge/handleActions rewired). This is the pre-cut for PR-9: /actions and /mcp become mechanical domain extractions now that their shared machinery is a module. Verified: runtime 649, http-conformance 41, dogfood 351 (full-build first — the suite needs every example/connector dist), dependent closure DTS green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d318b24 commit 7dedf30

3 files changed

Lines changed: 741 additions & 639 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@objectstack/runtime": minor
3+
---
4+
5+
feat(runtime): extract the action-execution subsystem from the dispatcher — ADR-0076 D11 step ③, PR-8 (#2462)
6+
7+
The 16-helper machinery behind server-registered business actions
8+
(declaration collection/resolution, ADR-0104 param enforcement, the
9+
permission/AI-exposure gates, the engine facade + session shape, invocation,
10+
and the `callData` protocol/ObjectQL bridge — ~560 lines) moves to
11+
`action-execution.ts`, depending only on the narrow `ActionExecutionDeps`
12+
slice (resolveService + getObjectQL; NO env-resolution state). The
13+
ADR-0104 warn-once statics ride along as module functions. The dispatcher
14+
keeps four thin delegates with in-class callers; twelve internal-only
15+
helpers are called directly on the module. This is the pre-cut that turns
16+
the `/actions` and `/mcp` domain extractions into mechanical moves (PR-9).
17+
Zero behavior change — runtime 649, http-conformance 41, dogfood 351 green.

0 commit comments

Comments
 (0)