@objectstack/runtime 10.3.0 → 11.0.0
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/LICENSE +202 -93
- package/dist/index.cjs +441 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +449 -236
- package/dist/index.js.map +1 -1
- package/package.json +21 -21
package/dist/index.d.cts
CHANGED
|
@@ -1014,6 +1014,49 @@ declare class HttpDispatcher {
|
|
|
1014
1014
|
* engine access.
|
|
1015
1015
|
*/
|
|
1016
1016
|
private buildMcpBridge;
|
|
1017
|
+
/**
|
|
1018
|
+
* [ADR-0066 D4] Shared capability gate for an action invocation. Returns a
|
|
1019
|
+
* human-readable error string when the caller's `systemPermissions` don't
|
|
1020
|
+
* cover the action's declared `requiredPermissions`, or `null` when allowed.
|
|
1021
|
+
* System/engine self-invocation (`isSystem`) bypasses; an action without
|
|
1022
|
+
* `requiredPermissions` is ungated. Single-sourced so the REST `/actions/...`
|
|
1023
|
+
* route and the MCP `run_action` bridge enforce the SAME declaration.
|
|
1024
|
+
*/
|
|
1025
|
+
private actionPermissionError;
|
|
1026
|
+
/**
|
|
1027
|
+
* Whether an action has a headless invocation path (so MCP can run it).
|
|
1028
|
+
* Mirrors the supported-type set of the (now cloud-side) action-tools
|
|
1029
|
+
* bridge: `script` needs a handler binding (`target`) or an inline `body`;
|
|
1030
|
+
* `flow` needs a `target` and an automation service. UI-only types
|
|
1031
|
+
* (`url`, `modal`, `form`) and `api` have no server dispatch here.
|
|
1032
|
+
*/
|
|
1033
|
+
private isHeadlessInvokableAction;
|
|
1034
|
+
/** True when an action is destructive by author signal/heuristic (HITL hint). */
|
|
1035
|
+
private actionLooksDestructive;
|
|
1036
|
+
/** Project an action's declarative metadata into a lean MCP summary. */
|
|
1037
|
+
private summarizeAction;
|
|
1038
|
+
/** Map an ObjectStack field type to a JSON-Schema primitive (conservative). */
|
|
1039
|
+
private jsonTypeOf;
|
|
1040
|
+
/** Resolve an action's params into LLM-facing summaries (field-backed types resolved). */
|
|
1041
|
+
private summarizeActionParams;
|
|
1042
|
+
/** Slim engine facade matching the ActionContext.engine shape handlers expect. */
|
|
1043
|
+
private buildActionEngineFacade;
|
|
1044
|
+
/**
|
|
1045
|
+
* Resolve + invoke a business action by its declarative name for the MCP
|
|
1046
|
+
* `run_action` tool. Enforces the ADR-0066 D4 capability gate and RLS as the
|
|
1047
|
+
* caller, loads the subject record under RLS for row-context actions, and
|
|
1048
|
+
* dispatches through the framework's `engine.executeAction` (script/body) or
|
|
1049
|
+
* automation flow runner (flow). Throws on denial / not-found / handler
|
|
1050
|
+
* failure so the tool surfaces a clean tool-error. No service-ai dependency.
|
|
1051
|
+
*/
|
|
1052
|
+
private invokeBusinessAction;
|
|
1053
|
+
/**
|
|
1054
|
+
* Find an action's declarative definition by name across object metadata,
|
|
1055
|
+
* optionally scoped to a single object. Returns the action plus its owning
|
|
1056
|
+
* object name, or `null`. Throws when the name is ambiguous across objects
|
|
1057
|
+
* and no `objectName` was supplied (so `run_action` can ask for one).
|
|
1058
|
+
*/
|
|
1059
|
+
private resolveActionByName;
|
|
1017
1060
|
/**
|
|
1018
1061
|
* Generate a `sys_api_key` and return the raw secret EXACTLY ONCE
|
|
1019
1062
|
* (`POST /keys`). This is the only mint path — the raw key is never stored
|
package/dist/index.d.ts
CHANGED
|
@@ -1014,6 +1014,49 @@ declare class HttpDispatcher {
|
|
|
1014
1014
|
* engine access.
|
|
1015
1015
|
*/
|
|
1016
1016
|
private buildMcpBridge;
|
|
1017
|
+
/**
|
|
1018
|
+
* [ADR-0066 D4] Shared capability gate for an action invocation. Returns a
|
|
1019
|
+
* human-readable error string when the caller's `systemPermissions` don't
|
|
1020
|
+
* cover the action's declared `requiredPermissions`, or `null` when allowed.
|
|
1021
|
+
* System/engine self-invocation (`isSystem`) bypasses; an action without
|
|
1022
|
+
* `requiredPermissions` is ungated. Single-sourced so the REST `/actions/...`
|
|
1023
|
+
* route and the MCP `run_action` bridge enforce the SAME declaration.
|
|
1024
|
+
*/
|
|
1025
|
+
private actionPermissionError;
|
|
1026
|
+
/**
|
|
1027
|
+
* Whether an action has a headless invocation path (so MCP can run it).
|
|
1028
|
+
* Mirrors the supported-type set of the (now cloud-side) action-tools
|
|
1029
|
+
* bridge: `script` needs a handler binding (`target`) or an inline `body`;
|
|
1030
|
+
* `flow` needs a `target` and an automation service. UI-only types
|
|
1031
|
+
* (`url`, `modal`, `form`) and `api` have no server dispatch here.
|
|
1032
|
+
*/
|
|
1033
|
+
private isHeadlessInvokableAction;
|
|
1034
|
+
/** True when an action is destructive by author signal/heuristic (HITL hint). */
|
|
1035
|
+
private actionLooksDestructive;
|
|
1036
|
+
/** Project an action's declarative metadata into a lean MCP summary. */
|
|
1037
|
+
private summarizeAction;
|
|
1038
|
+
/** Map an ObjectStack field type to a JSON-Schema primitive (conservative). */
|
|
1039
|
+
private jsonTypeOf;
|
|
1040
|
+
/** Resolve an action's params into LLM-facing summaries (field-backed types resolved). */
|
|
1041
|
+
private summarizeActionParams;
|
|
1042
|
+
/** Slim engine facade matching the ActionContext.engine shape handlers expect. */
|
|
1043
|
+
private buildActionEngineFacade;
|
|
1044
|
+
/**
|
|
1045
|
+
* Resolve + invoke a business action by its declarative name for the MCP
|
|
1046
|
+
* `run_action` tool. Enforces the ADR-0066 D4 capability gate and RLS as the
|
|
1047
|
+
* caller, loads the subject record under RLS for row-context actions, and
|
|
1048
|
+
* dispatches through the framework's `engine.executeAction` (script/body) or
|
|
1049
|
+
* automation flow runner (flow). Throws on denial / not-found / handler
|
|
1050
|
+
* failure so the tool surfaces a clean tool-error. No service-ai dependency.
|
|
1051
|
+
*/
|
|
1052
|
+
private invokeBusinessAction;
|
|
1053
|
+
/**
|
|
1054
|
+
* Find an action's declarative definition by name across object metadata,
|
|
1055
|
+
* optionally scoped to a single object. Returns the action plus its owning
|
|
1056
|
+
* object name, or `null`. Throws when the name is ambiguous across objects
|
|
1057
|
+
* and no `objectName` was supplied (so `run_action` can ask for one).
|
|
1058
|
+
*/
|
|
1059
|
+
private resolveActionByName;
|
|
1017
1060
|
/**
|
|
1018
1061
|
* Generate a `sys_api_key` and return the raw secret EXACTLY ONCE
|
|
1019
1062
|
* (`POST /keys`). This is the only mint path — the raw key is never stored
|