v2: fix action routes (proper method paths), complete REST Action API

- GET /api/v1/actions (discovery, 47 actions), GET /api/v1/actions/:id (contract)
- POST /api/v1/actions/:actionId (unified execute via Action Runtime)
- GET /api/v1/v2/resources (resource discovery)
- legacy bridge wraps WorkspaceAction.run into execute (fixed registration)
- ActionContext.organizationId used by legacy bridge for workspace scoping
This commit is contained in:
phptits
2026-09-10 21:44:25 +00:00
parent b1f17cf637
commit 72012a7da3
4 changed files with 25 additions and 10 deletions
@@ -0,0 +1,16 @@
/**
* # Resource Discovery 控制器(docs 03 §90;/api/v1/v2/resources)
*/
import { Controller, Get } from "@nestjs/common";
import { ActionRuntime } from "../runtime/action-runtime";
@Controller("v2/resources")
export class V2ResourcesController {
constructor(private readonly runtime: ActionRuntime) {}
/** # 资源发现 */
@Get()
list() {
return this.runtime.discoverResources();
}
}