Personally, I'd prefer the constructor having access to the complete spec at construction time. This makes it possible to plug in a single custom ops factory capable of creating multiple ops. Without access to the spec, the external consumer effectively must register a unique construction function per op type.

E.g., with spec
```
opFactory.register('CustomOp1', customOpsFactory.create);
opFactory.register('CustomOp2', customOpsFactory.create);
```

Without access to the spec, this must become:
```
opFactory.register('CustomOp1', customOpsFactory.createOp1);
opFactory.register('CustomOp2', customOpsFactory.createOp2);
```

But... the code changes to match either pattern are insignificant from my end, so please pick the design you prefer :).