MCPcopy Create free account
hub / github.com/holaboss-ai/holaOS / sync

Method sync

runtime/api-server/src/memory.ts:686–714  ·  view source on GitHub ↗
(payload: Record<string, unknown>)

Source from the content-addressed store, hash-verified

684 }
685
686 async sync(payload: Record<string, unknown>): Promise<Record<string, unknown>> {
687 const workspaceId = requiredString(payload.workspace_id, "workspace_id");
688 const roots = resolveMemoryRoots({
689 workspaceRoot: this.#workspaceRoot,
690 workspaceId,
691 resolveWorkspaceDir: this.#resolveWorkspaceDir,
692 });
693 let rebuilt: Record<string, unknown> | null = null;
694 if (this.#store) {
695 const store = this.#store;
696 const interaction = await rebuildAllInteractionTrees({
697 store,
698 workspaceId,
699 });
700 const integration = await rebuildAllIntegrationTrees({
701 store,
702 workspaceId,
703 });
704 rebuilt = {
705 interaction,
706 integration,
707 };
708 }
709 return {
710 success: true,
711 rebuilt,
712 status: await this.status({ workspace_id: workspaceId })
713 };
714 }
715}

Callers

nothing calls this directly

Calls 5

statusMethod · 0.95
resolveMemoryRootsFunction · 0.85
requiredStringFunction · 0.70

Tested by

no test coverage detected