feat(FN-3505): add node onboarding mapping flow with asset-gated bundling
- Add onboarding project-mapping API contracts and dashboard UI wiring in AddNodeModal/NodesView - Persist node-to-project mappings with rollback-safe failure handling and expanded hook/API test coverage - Document node onboarding mapping behavior in architecture and multi-project docs - Add tsup bundle asset gates for openclaw bridge and droid runtime, with changesets and bundle output tests Fusion-Task-Id: FN-3505
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
* All functions route through /api/proxy/:nodeId/... when a remote node is targeted.
|
||||
*/
|
||||
|
||||
import type { ProjectInfo } from "./api";
|
||||
import type { NodeProjectMappingInput, ProjectInfo } from "./api";
|
||||
import type { ProjectHealth, ProjectNodePathMapping, Task } from "@fusion/core";
|
||||
import { api, proxyApi } from "./api";
|
||||
import { api, proxyApi, upsertProjectPathMapping } from "./api";
|
||||
|
||||
/** Health information for a remote node */
|
||||
export interface RemoteNodeHealth {
|
||||
@@ -125,3 +125,13 @@ export async function syncNodeAuth(nodeId: string): Promise<NodeAuthSyncResult>
|
||||
export async function fetchNodeProjectPathMappings(nodeId: string): Promise<ProjectNodePathMapping[]> {
|
||||
return api<ProjectNodePathMapping[]>(`/nodes/${encodeURIComponent(nodeId)}/path-mappings`);
|
||||
}
|
||||
|
||||
/** Persist one mapping per selected project for a newly-created node. */
|
||||
export async function persistNodeProjectPathMappings(
|
||||
nodeId: string,
|
||||
projectMappings: NodeProjectMappingInput[],
|
||||
): Promise<ProjectNodePathMapping[]> {
|
||||
return Promise.all(
|
||||
projectMappings.map(({ projectId, path }) => upsertProjectPathMapping(projectId, nodeId, path)),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user